summaryrefslogtreecommitdiffstats
path: root/rescue/tree/etc
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2001-04-16 14:17:57 +0000
committerFrancois Pons <fpons@mandriva.com>2001-04-16 14:17:57 +0000
commit6b36f1d344b5ebc7637c0072767ad0edfd38a60f (patch)
tree72229d904561467fbd34097afe3a6cc0b2722767 /rescue/tree/etc
parent55ef6d852025b2aee6f633ecb72f588630acb035 (diff)
downloaddrakx-6b36f1d344b5ebc7637c0072767ad0edfd38a60f.tar
drakx-6b36f1d344b5ebc7637c0072767ad0edfd38a60f.tar.gz
drakx-6b36f1d344b5ebc7637c0072767ad0edfd38a60f.tar.bz2
drakx-6b36f1d344b5ebc7637c0072767ad0edfd38a60f.tar.xz
drakx-6b36f1d344b5ebc7637c0072767ad0edfd38a60f.zip
moved warning message around.
Diffstat (limited to 'rescue/tree/etc')
-rwxr-xr-xrescue/tree/etc/oem34
1 files changed, 26 insertions, 8 deletions
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 = <STDIN>) !~ /^\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 = <STDIN>) !~ /^\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 = <STDIN>) !~ /^\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 = <STDIN>) !~ /^\s*yes\s*$/i);
+ }
#- build a new disk label here.
print F "mklabel msdos\n";
}