From 4aaaac06925be03d5543cdfec921842b0f019632 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Mon, 18 Aug 2003 08:31:22 +0000 Subject: make testing mode usefull for debugging drakfloppy --- perl-install/standalone/drakfloppy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'perl-install/standalone') diff --git a/perl-install/standalone/drakfloppy b/perl-install/standalone/drakfloppy index 157966732..16ad16c64 100755 --- a/perl-install/standalone/drakfloppy +++ b/perl-install/standalone/drakfloppy @@ -301,12 +301,12 @@ sub build_it() { $co .= join(" --mkinitrdargs --with=", map { $_->[0] } @modules); $co .= " " . $kernel_combo->entry->get_text; $co .= " 2>&1 |"; - warn_dialog(N("Warning"), N("Be sure a media is present for the device %s", $device_combo->entry->get_text)) or return; + $::testing or warn_dialog(N("Warning"), N("Be sure a media is present for the device %s", $device_combo->entry->get_text)) or return; # we test if the media is present test: my $a = "dd count=1 if=/dev/null of=" . $device_combo->entry->get_text . " 2>&1"; my $b = `$a`; - if ($b =~ /dd/) { + if (!$::testing && $b =~ /dd/) { err_dialog(N("Error"), N("There is no medium or it is write-protected for device %s.\nPlease insert one.", $device_combo->entry->get_text), { cancel => 1 }) ? goto test : return 0; } -- cgit v1.2.1