X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Fautomount.c;h=b1619a64e6d799bd8c712ca0633639935a35acab;hb=774de5a97fe69da822fde77b88af8d970ab5d0c6;hp=c4a75280fc0c6a7616985a5e3d53921183e869d8;hpb=2cc58876202b06fabcdb1b0ab1cf7beb1945a3f3;p=elogind.git diff --git a/src/core/automount.c b/src/core/automount.c index c4a75280f..b1619a64e 100644 --- a/src/core/automount.c +++ b/src/core/automount.c @@ -156,7 +156,7 @@ static int automount_add_default_dependencies(Automount *a) { assert(a); - if (UNIT(a)->manager->running_as != MANAGER_SYSTEM) + if (UNIT(a)->manager->running_as != SYSTEMD_SYSTEM) return 0; r = unit_add_two_dependencies_by_name(UNIT(a), UNIT_BEFORE, UNIT_CONFLICTS, SPECIAL_UMOUNT_TARGET, NULL, true); @@ -501,6 +501,9 @@ static void automount_enter_waiting(Automount *a) { /* We knowingly ignore the results of this call */ mkdir_p_label(a->where, 0555); + if (dir_is_empty(a->where) <= 0) + log_notice("%s: Directory %s to mount over is not empty, mounting anyway. (To see the over-mounted files, please manually mount the underlying file system to a secondary location.)", a->meta.id, a->where); + if (pipe2(p, O_NONBLOCK|O_CLOEXEC) < 0) { r = -errno; goto fail;