diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-01-27 19:33:00 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-01-27 19:33:00 +0000 |
commit | ae427550a1ab5528bd033d4b7cc2ed738a5c776a (patch) | |
tree | 69e9b6f2d702dce1b8e9d9f0b4bdafa54d8bc5ca /perl-install/diskdrake/removable.pm | |
parent | 258b4c29d59ce9d701a46c98f663c2ea961288ba (diff) | |
download | drakx-ae427550a1ab5528bd033d4b7cc2ed738a5c776a.tar drakx-ae427550a1ab5528bd033d4b7cc2ed738a5c776a.tar.gz drakx-ae427550a1ab5528bd033d4b7cc2ed738a5c776a.tar.bz2 drakx-ae427550a1ab5528bd033d4b7cc2ed738a5c776a.tar.xz drakx-ae427550a1ab5528bd033d4b7cc2ed738a5c776a.zip |
new diskdrake modules (diskdrake_interactive is now diskdrake::interactive, diskdrake is now diskdrake::hd_gtk, others created from diskdrake.pm)
Diffstat (limited to 'perl-install/diskdrake/removable.pm')
-rw-r--r-- | perl-install/diskdrake/removable.pm | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/perl-install/diskdrake/removable.pm b/perl-install/diskdrake/removable.pm new file mode 100644 index 000000000..a73c6587b --- /dev/null +++ b/perl-install/diskdrake/removable.pm @@ -0,0 +1,55 @@ +package diskdrake::removable; # $Id$ + +use diagnostics; +use strict; +use diskdrake::interactive; +use common; +use fsedit; +use fs; + +sub main { + my ($in, $all_hds, $raw_hd) = @_; + + $raw_hd = fsedit::mntpoint2part("/mnt/cdrom", [ fsedit::get_really_all_fstab($all_hds) ]); + my %actions = my @actions = actions(); + my $action; + while ($action ne 'Done') { + $action = $in->ask_from_list_('', + diskdrake::interactive::format_raw_hd_info($raw_hd), + [ map { $_->[0] } group_by2 @actions ], 'Done') or return; + $actions{$action}->($in, $raw_hd, $all_hds); + } +} + +sub actions { + ( + __("Mount point") => \&mount_point, + __("Options") => \&options, + __("Type") => \&type, + __("Done") => \&done, + ); +} + +sub done { + my ($in, $raw_hd, $all_hds) = @_; + diskdrake::interactive::Done($in, $all_hds); +} +sub options { + my ($in, $raw_hd, $all_hds) = @_; + diskdrake::interactive::Options($in, {}, $raw_hd, $all_hds); +} +sub mount_point { + my ($in, $raw_hd, $all_hds) = @_; + diskdrake::interactive::Mount_point_raw_hd($in, $raw_hd, $all_hds); +} +sub type { + my ($in, $raw_hd) = @_; + my @fs = ('auto', fs::auto_fs()); + my $type = $raw_hd->{type}; + $in->ask_from(_("Change type"), + _("Which filesystem do you want?"), + [ { label => _("Type"), val => \$type, list => [@fs], not_edit => !$::expert } ]) or return; + $raw_hd->{type} = $type; +} + +1; |