[systemd-commits] src/mount.c src/swap.c TODO

Lennart Poettering lennart at kemper.freedesktop.org
Tue Oct 26 13:59:03 PDT 2010


 TODO        |    2 +-
 src/mount.c |   11 +++++------
 src/swap.c  |    2 +-
 3 files changed, 7 insertions(+), 8 deletions(-)

New commits:
commit 510051fc1264ace4ab657b52ec6fb5e2ccfda740
Author: Lennart Poettering <lennart at poettering.net>
Date:   Tue Oct 26 22:58:54 2010 +0200

    swap: add only swaps listed in /etc/fstab automatically to swap.target, others should be added via .wants/ links

diff --git a/TODO b/TODO
index 50ad9fa..43ce2f0 100644
--- a/TODO
+++ b/TODO
@@ -80,7 +80,7 @@
 
 * make description of .swap files nicer: resolve /dev/by-uuid/ symlink
 
-* only add quotacheck deps t .mount units which mention grpquota/usrquota in the mount flags
+* only add quotacheck deps to .mount units which mention grpquota/usrquota in the mount flags
 
 External:
 
diff --git a/src/mount.c b/src/mount.c
index 3fc0f13..d62ce8f 100644
--- a/src/mount.c
+++ b/src/mount.c
@@ -265,7 +265,7 @@ static int mount_add_target_links(Mount *m) {
         MountParameters *p;
         Unit *tu;
         int r;
-        bool noauto, handle, automount, user;
+        bool noauto, handle, automount;
 
         assert(m);
 
@@ -277,7 +277,6 @@ static int mount_add_target_links(Mount *m) {
                 return 0;
 
         noauto = !!mount_test_option(p->options, MNTOPT_NOAUTO);
-        user = mount_test_option(p->options, "user") || mount_test_option(p->options, "users");
         handle = !!mount_test_option(p->options, "comment=systemd.mount") ||
                 m->meta.manager->mount_auto;
         automount = !!mount_test_option(p->options, "comment=systemd.automount");
@@ -311,10 +310,10 @@ static int mount_add_target_links(Mount *m) {
                  * 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;
+                    m->from_etc_fstab &&
+                    m->meta.manager->running_as == MANAGER_SYSTEM)
+                        if ((r = unit_add_dependency(tu, UNIT_WANTS, UNIT(m), true)) < 0)
+                                return r;
 
                 return unit_add_dependency(UNIT(m), UNIT_BEFORE, tu, true);
         }
diff --git a/src/swap.c b/src/swap.c
index abd8cdd..4404dc0 100644
--- a/src/swap.c
+++ b/src/swap.c
@@ -176,7 +176,7 @@ static int swap_add_target_links(Swap *s) {
 
         if (!p->noauto &&
             (p->handle || s->meta.manager->swap_auto) &&
-            !s->from_fragment &&
+            s->from_etc_fstab &&
             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