chiark / gitweb /
main: don't try to mout cpuset with cpu+cpuacct anymore
authorLennart Poettering <lennart@poettering.net>
Mon, 24 Sep 2012 09:35:51 +0000 (11:35 +0200)
committerLennart Poettering <lennart@poettering.net>
Mon, 24 Sep 2012 09:35:51 +0000 (11:35 +0200)
Turns out cpuset needs explicit initialization before we could make use
of it. Thus mounting cpuset with cpu/cpuacct would make it impossible to
just create a group in "cpu" and start it.

TODO
src/core/main.c

diff --git a/TODO b/TODO
index 77d2375ce4bf1bdf76a6eaa1093ce393ab092595..1fdcd831c8b32d30510d403c088abbcd5dbe1cce 100644 (file)
--- a/TODO
+++ b/TODO
@@ -19,6 +19,12 @@ F18:
 
 Features:
 
 
 Features:
 
+* cryptsetup-generator: warn if the password files are world-readable
+
+* cryptsetup-generator: add RequiresMountsFor= to cryptseup service files referencing a file, similar for devices
+
+* cryptsetup-generator: allow specification of passwords in crypttab itself
+
 * document that deps in [Unit] sections ignore Alias= fileds in
   [Install] units of other units, unless those units are disabled
 
 * document that deps in [Unit] sections ignore Alias= fileds in
   [Install] units of other units, unless those units are disabled
 
index 04fc0b3b59fda78108d91920f519b35ab72f5f44..f9aba46b5865527153569a7f22baf6b651c95ed2 100644 (file)
@@ -1227,6 +1227,28 @@ static void test_cgroups(void) {
         sleep(10);
 }
 
         sleep(10);
 }
 
+static int initialize_join_controllers(void) {
+        /* By default, mount "cpu" + "cpuacct" together, and "net_cls"
+         * + "net_prio". We'd like to add "cpuset" to the mix, but
+         * "cpuset" does't really work for groups with no initialized
+         * attributes. */
+
+        arg_join_controllers = new(char**, 3);
+        if (!arg_join_controllers)
+                return -ENOMEM;
+
+        arg_join_controllers[0] = strv_new("cpu", "cpuacct", NULL);
+        if (!arg_join_controllers[0])
+                return -ENOMEM;
+
+        arg_join_controllers[1] = strv_new("net_cls", "net_prio", NULL);
+        if (!arg_join_controllers[1])
+                return -ENOMEM;
+
+        arg_join_controllers[2] = NULL;
+        return 0;
+}
+
 int main(int argc, char *argv[]) {
         Manager *m = NULL;
         int r, retval = EXIT_FAILURE;
 int main(int argc, char *argv[]) {
         Manager *m = NULL;
         int r, retval = EXIT_FAILURE;
@@ -1371,16 +1393,8 @@ int main(int argc, char *argv[]) {
                 goto finish;
         }
 
                 goto finish;
         }
 
-        /* By default, mount "cpu" and "cpuacct" together */
-        arg_join_controllers = new(char**, 3);
-        if (!arg_join_controllers)
-                goto finish;
-
-        arg_join_controllers[0] = strv_new("cpu", "cpuacct", "cpuset", NULL);
-        arg_join_controllers[1] = strv_new("net_cls", "net_prio", NULL);
-        arg_join_controllers[2] = NULL;
-
-        if (!arg_join_controllers[0])
+        r = initialize_join_controllers();
+        if (r < 0)
                 goto finish;
 
         /* Mount /proc, /sys and friends, so that /proc/cmdline and
                 goto finish;
 
         /* Mount /proc, /sys and friends, so that /proc/cmdline and