Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/sh
- #
- # This is run by d-i before the partman step (e.g. d-i partman/early_command)
- #MIN_DISK_SIZE=20000000
- youlose() {
- echo ""
- echo "****************************"
- echo "ERROR: $@"
- echo "Installation cannot proceed. Press any key to reboot."
- read foo
- echo "Rebooting, please wait..."
- reboot
- }
- # Unmount partitions because partman and d-i are incompetent.
- # http://ubuntuforums.org/showthread.php?t=2215103&p=12977473
- # LP: 1355845
- for p in $(list-devices partition); do
- umount "$p" || true
- done
- disks=$(list-devices disk)
- if ! echo "$disks" | grep -q ^/dev; then
- youlose "No disks found."
- fi
- for dsk in $disks
- do
- echo $dsk "$(sfdisk -s "$dsk")"
- #if [ "$(sfdisk -s "$dsk")" -lt $MIN_DISK_SIZE ]; then
- # youlose "Your disk is too small ($(( $MIN_DISK_SIZE / 1000000)) GB required)."
- #fi
- done
- read -p "Ingrese el disco a usar: " opt
- #chvt 5
- # Steal STDIN and STDOUT back from the installer
- exec < /dev/tty1 > /dev/tty1 2>&1
- # Tell partman which disk to use
- debconf-set partman-auto/disk "$opt"
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement