From 180f74f901fb15006f95b1bf1910e0770d59a069 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Lefebvre?= Date: Mon, 17 Aug 2009 12:57:51 +0000 Subject: - diskdrake : added delete mountpoint support for davfs2 --- perl-install/NEWS | 1 + perl-install/diskdrake/dav.pm | 11 +++++++++++ 2 files changed, 12 insertions(+) (limited to 'perl-install') diff --git a/perl-install/NEWS b/perl-install/NEWS index de13db4ce..4d9c32674 100644 --- a/perl-install/NEWS +++ b/perl-install/NEWS @@ -5,6 +5,7 @@ o Fix a crash with regexp when a /etc/davfs2/secrets line is finished with one or more blank characters without comments o added the ability to exit the davfs2 mountpoint settings panel + o added delete mountpoint support for davfs2 - adduserdrake o now use password weakness display - added password weakness display feature in interactive 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"; -- cgit v1.2.1