summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/drakautoinst
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-09-09 14:31:11 +0000
committerFrancois Pons <fpons@mandriva.com>2003-09-09 14:31:11 +0000
commit5f1c66c1b98e9b7742a6d90a13bdbcc19e02503a (patch)
tree643e922d794f0da0be212b5d1d10ad8878e5a583 /perl-install/standalone/drakautoinst
parentac2f2897875dd51632e1317934d6795991e5cf3d (diff)
downloaddrakx-5f1c66c1b98e9b7742a6d90a13bdbcc19e02503a.tar
drakx-5f1c66c1b98e9b7742a6d90a13bdbcc19e02503a.tar.gz
drakx-5f1c66c1b98e9b7742a6d90a13bdbcc19e02503a.tar.bz2
drakx-5f1c66c1b98e9b7742a6d90a13bdbcc19e02503a.tar.xz
drakx-5f1c66c1b98e9b7742a6d90a13bdbcc19e02503a.zip
try again if no floppy (or error during creation of floppy)
Diffstat (limited to 'perl-install/standalone/drakautoinst')
-rwxr-xr-xperl-install/standalone/drakautoinst14
1 files changed, 9 insertions, 5 deletions
diff --git a/perl-install/standalone/drakautoinst b/perl-install/standalone/drakautoinst
index fbbdca9ed..6364228f7 100755
--- a/perl-install/standalone/drakautoinst
+++ b/perl-install/standalone/drakautoinst
@@ -70,13 +70,17 @@ ${$_->[1]} eq N("manual") and push @manual_steps, $_->[0] foreach @all_steps;
my $mountdir = "/root/tmp/drakautoinst-mountdir"; -d $mountdir or mkdir $mountdir, 0755;
my $floppy = detect_devices::floppy();
my $dev = devices::make($floppy);
-$in->ask_okcancel('', N("Insert a blank floppy in drive %s", $floppy), 1) or quit_global($in, 0);
-{
+my $again;
+do {
+ $in->ask_okcancel('', N("Insert a blank floppy in drive %s", $floppy), 1) or quit_global($in, 0);
log::explanations(N("Creating auto install floppy"));
my $_w = $in->wait_message('', N("Creating auto install floppy"));
- commands::dd("if=$imagefile", "of=$dev", "bs=1440", "count=1024");
- common::sync();
-}
+ eval {
+ commands::dd("if=$imagefile", "of=$dev", "bs=1440", "count=1024");
+ common::sync();
+ };
+ $again = $@; #- grrr... $@ is localized in code block :-(
+} while ($again);
fs::mount($dev, $mountdir, 'vfat', 0);
my $cfgfile = "$mountdir/auto_inst.cfg";
eval(cat_($cfgfile));