From 4b5a9e050d616746d204106482947665cd54b2d1 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Thu, 5 Aug 2004 08:21:07 +0000 Subject: make room on replay/auto_install floppy image before doing anything --- perl-install/install_any.pm | 20 +++++++++++--------- 1 file 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); -- cgit v1.2.1