From fb99b425049ff55d76b863c9357d58d5925a3c3d Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Fri, 17 Aug 2001 17:09:25 +0000 Subject: a hell lot of cleanup/rewrite: * diskdrake_interactive created, diskdrake is now interactive aware * added some documentation about the structure used for partitioning * all_hds now contain the various hds, lvm, raid * cleanup the isLVM, isRAID and alike functions * field {type} in detect_devices is now {media_type} * detect_devices::floppies is now floppies_dev * removed old function prototypes --- perl-install/standalone/diskdrake | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'perl-install/standalone') diff --git a/perl-install/standalone/diskdrake b/perl-install/standalone/diskdrake index 01c0ed294..6cee947b7 100755 --- a/perl-install/standalone/diskdrake +++ b/perl-install/standalone/diskdrake @@ -26,7 +26,7 @@ use lib qw(/usr/lib/libDrakX); use common; use diskdrake; use standalone; -use interactive_gtk; +use interactive; use detect_devices; use fsedit; use fs; @@ -51,14 +51,8 @@ if ($>) { } -#if ($ARGV[0] eq '-l') { -# $@ and print "Error\n"; -# $::expert = 1; -# print diskdrake::get_info($_, $hds->[0]) foreach fsedit::get_fstab($hds->[0]); -# exit !$@; -#} -my $in = interactive_gtk->new; -my ($hds, $lvms) = +my $in = 'interactive'->vnew('su'); +my ($all_hds) = catch_cdie { fsedit::hds([ detect_devices::hds() ], {}) } sub { my ($err) = $@ =~ /(.*) at /; @@ -69,10 +63,12 @@ I'll try to go on blanking bad partitions"), $err]); }; $SIG{__DIE__} = sub { my $m = chomp_($_[0]); log::l("ERROR: $m") }; -my $fstab = [ fsedit::get_fstab(@$hds, @$lvms) ]; - -fs::get_mntpoints_from_fstab($fstab); +my $fstab = [ fsedit::get_all_fstab($all_hds) ]; + +$all_hds->{raw_hds} = [ fs::raw_hds() ]; + +fs::get_all_mntpoints_from_fstab($all_hds); fs::check_mounted($fstab); -diskdrake::main($hds, $lvms, {}, $in); +diskdrake_interactive::main($in, $all_hds); $in->exit(0); -- cgit v1.2.1