summaryrefslogtreecommitdiff
path: root/hal-automounter.pl
diff options
context:
space:
mode:
authordakkar <dakkar@thenautilus.net>2013-03-31 20:54:53 +0100
committerdakkar <dakkar@thenautilus.net>2013-03-31 20:54:53 +0100
commit2888e4a2cc3ab16b3420d9436c6636f1a78365d4 (patch)
treefe9bea189e8a620f393964af6a5b589fe2e002a0 /hal-automounter.pl
parentalways clean up (diff)
downloadhal-automounter-2888e4a2cc3ab16b3420d9436c6636f1a78365d4.tar.gz
hal-automounter-2888e4a2cc3ab16b3420d9436c6636f1a78365d4.tar.bz2
hal-automounter-2888e4a2cc3ab16b3420d9436c6636f1a78365d4.zip
Revert "always clean up"
On remove, we don't always have enough info to determine the mountpoint, that's why I didn't cleanup!
Diffstat (limited to 'hal-automounter.pl')
-rwxr-xr-xhal-automounter.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/hal-automounter.pl b/hal-automounter.pl
index 41e488d..20ab563 100755
--- a/hal-automounter.pl
+++ b/hal-automounter.pl
@@ -155,11 +155,11 @@ sub device_removed {
if (exists $mounted{$node}) {
system('umount',$mounted{$node});
+ if (remove_from_fstab($mounted{$node})) {
+ rmdir $mounted{$node};
+ }
delete $mounted{$node};
}
- if (remove_from_fstab($mounted{$node})) {
- rmdir $mounted{$node};
- }
return;
}