diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-08-05 08:21:07 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-08-05 08:21:07 +0000 |
commit | 4b5a9e050d616746d204106482947665cd54b2d1 (patch) | |
tree | 4be3638f9f781a81337eaf4075944abfea1a1479 | |
parent | 17024971b293fa80196f7daabe7a9f97754d9c04 (diff) | |
download | drakx-4b5a9e050d616746d204106482947665cd54b2d1.tar drakx-4b5a9e050d616746d204106482947665cd54b2d1.tar.gz drakx-4b5a9e050d616746d204106482947665cd54b2d1.tar.bz2 drakx-4b5a9e050d616746d204106482947665cd54b2d1.tar.xz drakx-4b5a9e050d616746d204106482947665cd54b2d1.zip |
make room on replay/auto_install floppy image before doing anything
-rw-r--r-- | perl-install/install_any.pm | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm index e46248dfb..37f64ab39 100644 --- a/perl-install/install_any.pm +++ b/perl-install/install_any.pm @@ -857,12 +857,6 @@ sub getAndSaveAutoInstallFloppies { my $dev = devices::set_loop($img) or log::l("couldn't set loopback device"), return; find { eval { fs::mount($dev, $mountdir, $_, 0); 1 } } qw(ext2 vfat) or return; - if (@imgs == 1 || $img =~ /drivers/) { - local $o->{partitioning}{clearall} = !$replay; - eval { output("$mountdir/auto_inst.cfg", g_auto_install($replay)) }; - $@ and log::l("Warning: <", formatError($@), ">"); - } - if (-e "$mountdir/menu.lst") { # hd_grub boot disk is different than others substInFile { @@ -870,17 +864,25 @@ sub getAndSaveAutoInstallFloppies { s/\bautomatic=method:disk/$param/; } "$mountdir/menu.lst"; } elsif (-e "$mountdir/syslinux.cfg") { + #- make room first + unlink "$mountdir/help.msg", "$mountdir/boot.msg"; + substInFile { s/timeout.*/$replay ? 'timeout 1' : ''/e; s/^(\s*append)/$1 $param/ } "$mountdir/syslinux.cfg"; - unlink "$mountdir/help.msg"; - output "$mountdir/boot.msg", "\n0c", + output "$mountdir/boot.msg", $replay ? '' : "\n0c" . "!! If you press enter, an auto-install is going to start. All data on this computer is going to be lost, including any Windows partitions !! -", "07\n" if !$replay; +" . "07\n"; + } + + if (@imgs == 1 || $img =~ /drivers/) { + local $o->{partitioning}{clearall} = !$replay; + eval { output("$mountdir/auto_inst.cfg", g_auto_install($replay)) }; + $@ and log::l("Warning: <", formatError($@), ">"); } fs::umount($mountdir); |