summaryrefslogtreecommitdiff
path: root/src/automount.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-05-24 05:25:33 +0200
committerLennart Poettering <lennart@poettering.net>2010-05-24 05:25:33 +0200
commit01f78473b104d28db0fa813414092bc6358ae521 (patch)
treedbc1a63d818c7420ee2a50cbd205ae90b0c7185d /src/automount.c
parent871d7de47c13ee6cd78b8eefdf9128be3c740ac0 (diff)
path: add .path unit type for monitoring files
Diffstat (limited to 'src/automount.c')
-rw-r--r--src/automount.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/automount.c b/src/automount.c
index 32680461c2..d83f3ed053 100644
--- a/src/automount.c
+++ b/src/automount.c
@@ -562,12 +562,15 @@ static int automount_start(Unit *u) {
assert(a);
+ assert(a->state == AUTOMOUNT_DEAD || a->state == AUTOMOUNT_MAINTAINANCE);
+
if (path_is_mount_point(a->where)) {
log_error("Path %s is already a mount point, refusing start for %s", a->where, u->meta.id);
return -EEXIST;
}
- assert(a->state == AUTOMOUNT_DEAD || a->state == AUTOMOUNT_MAINTAINANCE);
+ if (a->mount->meta.load_state != UNIT_LOADED)
+ return -ENOENT;
a->failure = false;
automount_enter_waiting(a);