[systemd-commits] src/mount.c src/swap.c
Lennart Poettering
lennart at kemper.freedesktop.org
Wed Aug 25 12:24:29 PDT 2010
src/mount.c | 6 +++++-
src/swap.c | 5 ++++-
2 files changed, 9 insertions(+), 2 deletions(-)
New commits:
commit 81bf310edce1fccb2720b48fcc5f4bdbd187cd55
Author: Lennart Poettering <lennart at poettering.net>
Date: Wed Aug 25 21:24:21 2010 +0200
mount: imply noauto for mount points configured with native mount files
diff --git a/src/mount.c b/src/mount.c
index 08d5de2..5d5857f 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -266,7 +266,11 @@ static int mount_add_target_links(Mount *m) {
return unit_add_two_dependencies(tu, UNIT_AFTER, UNIT_WANTS, UNIT(am), true);
} else {
- if (!noauto && handle)
+ /* Automatically add mount points that aren't natively
+ * configured to local-fs.target */
+ if (!noauto &&
+ handle &&
+ !m->from_fragment)
if (user || m->meta.manager->running_as == MANAGER_SYSTEM)
if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(m), true)) < 0)
return r;
diff --git a/src/swap.c b/src/swap.c
index 69ccd3d..0beb921 100644
--- a/src/swap.c
+++ b/src/swap.c
@@ -113,7 +113,10 @@ static int swap_add_target_links(Swap *s) {
if ((r = manager_load_unit(s->meta.manager, SPECIAL_SWAP_TARGET, NULL, NULL, &tu)) < 0)
return r;
- if (!p->noauto && (p->handle || s->meta.manager->swap_auto) && s->meta.manager->running_as == MANAGER_SYSTEM)
+ if (!p->noauto &&
+ (p->handle || s->meta.manager->swap_auto) &&
+ !s->from_fragment &&
+ s->meta.manager->running_as == MANAGER_SYSTEM)
if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(s), true)) < 0)
return r;
More information about the systemd-commits
mailing list