Revision 25486,
759 bytes
checked in by jdreed, 12 years ago
(diff) |
Initial checkin of precise installer.
netconfig and related code has been removed.
clusteraddr command-line argument has been de-supported.
|
Line | |
---|
1 | #!/bin/sh |
---|
2 | # |
---|
3 | # This is run by d-i before the partman step (e.g. d-i partman/early_command) |
---|
4 | |
---|
5 | MIN_DISK_SIZE=20000000 |
---|
6 | |
---|
7 | youlose() { |
---|
8 | chvt 5 |
---|
9 | # Steal STDIN and STDOUT back from the installer |
---|
10 | exec < /dev/tty5 > /dev/tty5 2>&1 |
---|
11 | echo "" |
---|
12 | echo "****************************" |
---|
13 | echo "ERROR: $@" |
---|
14 | echo "Installation cannot proceed. Press any key to reboot." |
---|
15 | read foo |
---|
16 | echo "Rebooting, please wait..." |
---|
17 | reboot |
---|
18 | } |
---|
19 | |
---|
20 | first_disk=`list-devices disk | head -n1` |
---|
21 | if ! echo "$first_disk" | grep -q ^/dev; then |
---|
22 | youlose "No disks found." |
---|
23 | fi |
---|
24 | if [ "$(sfdisk -s "$first_disk")" -lt $MIN_DISK_SIZE ]; then |
---|
25 | youlose "Your disk is too small ($(( $MIN_DISK_SIZE / 1000000)) GB required)." |
---|
26 | fi |
---|
27 | # Tell partman which disk to use |
---|
28 | debconf-set partman-auto/disk "$first_disk" |
---|
29 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.