summaryrefslogtreecommitdiffstats
path: root/perl-install/diskdrake
diff options
context:
space:
mode:
authorAurélien Lefebvre <alefebvre@mandriva.com>2009-08-17 12:57:51 +0000
committerAurélien Lefebvre <alefebvre@mandriva.com>2009-08-17 12:57:51 +0000
commit180f74f901fb15006f95b1bf1910e0770d59a069 (patch)
treef70223055487fca4e0edcb17c308d73ea313afa2 /perl-install/diskdrake
parentfe972aaf9ac7a74ec204d5f4ba7f80dd0ab0901e (diff)
downloaddrakx-180f74f901fb15006f95b1bf1910e0770d59a069.tar
drakx-180f74f901fb15006f95b1bf1910e0770d59a069.tar.gz
drakx-180f74f901fb15006f95b1bf1910e0770d59a069.tar.bz2
drakx-180f74f901fb15006f95b1bf1910e0770d59a069.tar.xz
drakx-180f74f901fb15006f95b1bf1910e0770d59a069.zip
- diskdrake : added delete mountpoint support for davfs2
Diffstat (limited to 'perl-install/diskdrake')
-rw-r--r--perl-install/diskdrake/dav.pm11
1 files changed, 11 insertions, 0 deletions
diff --git a/perl-install/diskdrake/dav.pm b/perl-install/diskdrake/dav.pm
index e671a3ea2..6a7ae8770 100644
--- a/perl-install/diskdrake/dav.pm
+++ b/perl-install/diskdrake/dav.pm
@@ -65,6 +65,7 @@ sub actions {
N_("Server") => \&ask_server,
N_("Mount point") => \&mount_point,
N_("Options") => \&options,
+ N_("Remove") => \&remove,
N_("Done") => sub {},
);
}
@@ -99,6 +100,16 @@ sub options {
diskdrake::interactive::Options($in, {}, $dav, $all_hds);
return;
}
+
+sub remove {
+ my ($in, $dav, $all_hds) = @_;
+ if ($in->ask_yesorno(N("Warning"), N("Are you sure you want to delete this mountpoint?"))) {
+ @{$all_hds->{davs}} = grep($_->{mntpoint} ne $dav->{mntpoint}, @{$all_hds->{davs}});
+ return 1;
+ }
+ return;
+}
+
sub mount_point {
my ($in, $dav, $all_hds) = @_;
my $proposition = $dav->{device} =~ /(\w+)/ ? "/mnt/$1" : "/mnt/dav";