]> err.no Git - systemd/commitdiff
swap: add only swaps listed in /etc/fstab automatically to swap.target, others should...
authorLennart Poettering <lennart@poettering.net>
Tue, 26 Oct 2010 20:58:54 +0000 (22:58 +0200)
committerLennart Poettering <lennart@poettering.net>
Tue, 26 Oct 2010 20:58:54 +0000 (22:58 +0200)
TODO
src/mount.c
src/swap.c

diff --git a/TODO b/TODO
index 50ad9fa1df5aa6171e18896c358d7cd6eb1ecc07..43ce2f0cc57731514cab6b7cca21c5dd2b149067 100644 (file)
--- 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:
 
index 3fc0f1371657f689687e5029cf10f5905187e8d1..d62ce8f40893de885c2ce8b54344cdcfe2e77269 100644 (file)
@@ -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);
         }
index abd8cdd8d68f892e2d0b87c03adcf1430f1f0c7e..4404dc0e7111f8dfc0e100af916779c29536f561 100644 (file)
@@ -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;