summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/diskdrake
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/standalone/diskdrake')
-rwxr-xr-xperl-install/standalone/diskdrake14
1 files changed, 10 insertions, 4 deletions
diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake
index a3ffafe83..6696f29f4 100755
--- a/perl-install/standalone/diskdrake
+++ b/perl-install/standalone/diskdrake
@@ -22,7 +22,7 @@
# DiskDrake is also based upon the libfdisk and the install from Red Hat Software
-use lib qw(/usr/lib/libDrakX .);
+use lib qw(/usr/lib/libDrakX);
use common qw(:common :functional);
use diskdrake;
use interactive_gtk;
@@ -30,9 +30,15 @@ use detect_devices;
use fsedit;
use fs;
use log;
+use c;
+local $_ = join '', @ARGV;
+
+/-h/ and die "usage: diskdrake [--expert] [--testing]\n";
+
+$::expert = /-expert/;
+$::testing = /-testing/;
$::isStandalone = 1;
-#$::expert = 1;
if ($>) {
$ENV{PATH} = "/sbin:/usr/sbin:$ENV{PATH}";
@@ -56,11 +62,11 @@ my $hds =
I'll try to go on blanking bad partitions"), $err]);
};
-$SIG{__DIE__} = sub { chomp $_[0]; log::l("ERROR: $_[0]") };
+$SIG{__DIE__} = sub { chomp (my $m = $_[0]); log::l("ERROR: $m") };
my $fstab = [ fsedit::get_fstab(@$hds) ];
fs::get_mntpoints_from_fstab($fstab);
fs::check_mounted($fstab);
diskdrake::main($hds, {}, $in);
-exec "true";
+$in->exit(0);