summaryrefslogtreecommitdiff
path: root/hal-automounter.pl
diff options
context:
space:
mode:
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;
}