summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-08-05 08:21:07 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-08-05 08:21:07 +0000
commit4b5a9e050d616746d204106482947665cd54b2d1 (patch)
tree4be3638f9f781a81337eaf4075944abfea1a1479
parent17024971b293fa80196f7daabe7a9f97754d9c04 (diff)
downloaddrakx-backup-do-not-use-4b5a9e050d616746d204106482947665cd54b2d1.tar
drakx-backup-do-not-use-4b5a9e050d616746d204106482947665cd54b2d1.tar.gz
drakx-backup-do-not-use-4b5a9e050d616746d204106482947665cd54b2d1.tar.bz2
drakx-backup-do-not-use-4b5a9e050d616746d204106482947665cd54b2d1.tar.xz
drakx-backup-do-not-use-4b5a9e050d616746d204106482947665cd54b2d1.zip
make room on replay/auto_install floppy image before doing anything
-rw-r--r--perl-install/install_any.pm20
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);