summaryrefslogtreecommitdiff
path: root/src/automount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-07-10 02:41:06 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-10 02:41:06 +0200
commit4e67ddd6b39c2847cc399ab0874427baa7ea8935 (patch)
tree075d2522de569fb8a32651ad0728aeb720c8eed1 /src/automount.c
parentb8131a87ccdd9376882ca0a8dd3cfe45172e4c46 (diff)
units: introduce umount.target for unmounting all file systems
Diffstat (limited to 'src/automount.c')
-rw-r--r--src/automount.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/automount.c b/src/automount.c
index 39eb3dd01a..b5003b3a75 100644
--- a/src/automount.c
+++ b/src/automount.c
@@ -36,6 +36,7 @@
#include "unit-name.h"
#include "dbus-automount.h"
#include "bus-errors.h"
+#include "special.h"
static const UnitActiveState state_translation_table[_AUTOMOUNT_STATE_MAX] = {
[AUTOMOUNT_DEAD] = UNIT_INACTIVE,
@@ -194,6 +195,10 @@ static int automount_load(Unit *u) {
if ((r = unit_add_dependency(u, UNIT_BEFORE, UNIT(a->mount), true)) < 0)
return r;
+
+ if (a->meta.default_dependencies)
+ if ((r = unit_add_two_dependencies_by_name(UNIT(a), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true)) < 0)
+ return r;
}
return automount_verify(a);