2 # Delete, disable or enable all exports for some directories
4 require './exports-lib.pl';
7 &error_setup($text{'delete_err'});
9 @d = split(/\0/, $in{'d'});
10 @d || &error($text{'delete_enone'});
12 # Find the actual clients
13 &lock_file($config{'exports_file'});
14 @exps = &list_exports();
16 if (&indexof($e->{'dir'}, @d) >= 0) {
21 # Take them out, one by one
22 foreach $d (reverse(@dels)) {
26 elsif ($in{'disable'} && $d->{'active'}) {
28 &modify_export($d, $d);
30 elsif ($in{'enable'} && !$d->{'active'}) {
32 &modify_export($d, $d);
35 &unlock_file($config{'exports_file'});
36 &webmin_log($in{'delete'} ? "delete" : $in{'disable'} ? "disable" : "enable",
37 "exports", scalar(@dels));