From 6b36f1d344b5ebc7637c0072767ad0edfd38a60f Mon Sep 17 00:00:00 2001 From: Francois Pons Date: Mon, 16 Apr 2001 14:17:57 +0000 Subject: moved warning message around. --- rescue/tree/etc/oem | 34 ++++++++++++++++++++++++++-------- 1 file changed, 26 insertions(+), 8 deletions(-) (limited to 'rescue/tree') diff --git a/rescue/tree/etc/oem b/rescue/tree/etc/oem index fed8ec4c1..3e810e2a3 100755 --- a/rescue/tree/etc/oem +++ b/rescue/tree/etc/oem @@ -6,14 +6,6 @@ if ($ARGV[0] ne '-f') { } my ($yes, $hd, $cd); -do { - print " - -I'm going to install the OEM version on your hard drive -!!ALL DATA WILL BE LOST!! - -Type \`\`yes'' and [enter] to go on\n" -} while (($yes = ) !~ /^\s*yes\s*$/i); #- avoid globing as it is not available in rescue ramdisk. foreach my $device (split ' ', `/bin/ls -d /proc/ide/hd*`) { @@ -68,6 +60,14 @@ for (1..2) { close F; $hd_size and last; print "Unable to detect partition on disk, trying with new label\n"; + do { + print " + +I'm going to install the OEM version on your hard drive +!!ALL DATA WILL BE LOST!! + +Type \`\`yes'' and [enter] to go on\n" + } while (($yes = ) !~ /^\s*yes\s*$/i); system "parted", "/dev/$hd", "mklabel", "msdos"; } my ($min_size, $def_size, $trigger_size, $inst_size, $swap_size) = (2100, 2700, 4000, 200, 128); @@ -104,12 +104,30 @@ my $point = 0.0; open F, "| parted -s /dev/$hd"; if (defined $resize_fat_size) { + do { + print " + +!!An existing Windows partition has been found and will be kept. +Additional Linux partition will be created!! + +Type \`\`yes'' and [enter] to go on\n" + } while (($yes = ) !~ /^\s*yes\s*$/i); #- keep the current partition table, and try to resize the fat partition #- if the size is not 0. #- KEEP IN MIND there is only one partition defined. $point = $hd_parts[$fat_pos]{start} + $resize_fat_size; printf F "resize %d %s %s\n", $hd_parts[$fat_pos]{minor}, $hd_parts[$fat_pos]{start}, $point; } else { + unless (defined $yes) { + do { + print " + +I'm going to install the OEM version on your hard drive +!!ALL DATA WILL BE LOST!! + +Type \`\`yes'' and [enter] to go on\n" + } while (($yes = ) !~ /^\s*yes\s*$/i); + } #- build a new disk label here. print F "mklabel msdos\n"; } -- cgit v1.2.1