]> git.proxmox.com Git - mirror_lxc.git/commitdiff
confile: namespace lxc.init keys
author0x0916 <w@laoqinren.net>
Wed, 28 Jun 2017 08:32:04 +0000 (16:32 +0800)
committer0x0916 <w@laoqinren.net>
Thu, 29 Jun 2017 14:14:46 +0000 (22:14 +0800)
* rename lxc.init_cmd to lxc.init.cmd
* rename lxc.init_uid to lxc.init.uid
* rename lxc.init_gid to lxc.init.gid

the legacy keys will be kept around until LXC 3.0 and then will be
removed.

Signed-off-by: 0x0916 <w@laoqinren.net>
doc/ja/lxc-start.sgml.in
doc/ja/lxc.container.conf.sgml.in
doc/ja/lxc.sgml.in
doc/ko/lxc-start.sgml.in
doc/ko/lxc.container.conf.sgml.in
doc/ko/lxc.sgml.in
doc/lxc-start.sgml.in
doc/lxc.container.conf.sgml.in
doc/lxc.sgml.in
src/lxc/confile.c
src/tests/parse_config_file.c

index c0dd8723f0efec77faba61d72cd3be653580045a..b87833d1089e81f32b4ef1eae90a16e532407c22 100644 (file)
@@ -94,12 +94,12 @@ by KATOH Yasufumi <karma at jazz.email.ne.jp>
     <para>
       <!--
       If no command is specified, <command>lxc-start</command> will
-      use the command defined in lxc.init_cmd or if not set, the default
+      use the command defined in lxc.init.cmd or if not set, the default
       <command>"/sbin/init"</command> command to run a system
       container.
       -->
-      もし command が指定されない場合は、<command>lxc-start</command> はシステムコンテナを実行するためのコマンドとして、lxc.init_cmd で設定されたコマンドを使用します。
-      もし lxc.init_cmd が設定されていない場合は、デフォルトで <command>"/sbin/init"</command> を使用します。
+      もし command が指定されない場合は、<command>lxc-start</command> はシステムコンテナを実行するためのコマンドとして、lxc.init.cmd で設定されたコマンドを使用します。
+      もし lxc.init.cmd が設定されていない場合は、デフォルトで <command>"/sbin/init"</command> を使用します。
     </para>
 
   </refsect1>
index aa363512b7552ac65b706e9b2859ab43e23e6b94..8ac4189e52d588d7c1dc742b719686792b339a63 100644 (file)
@@ -349,7 +349,7 @@ by KATOH Yasufumi <karma at jazz.email.ne.jp>
       <variablelist>
         <varlistentry>
           <term>
-            <option>lxc.init_cmd</option>
+            <option>lxc.init.cmd</option>
           </term>
           <listitem>
             <para>
@@ -381,7 +381,7 @@ by KATOH Yasufumi <karma at jazz.email.ne.jp>
       <variablelist>
         <varlistentry>
           <term>
-            <option>lxc.init_uid</option>
+            <option>lxc.init.uid</option>
           </term>
           <listitem>
             <para>
@@ -394,7 +394,7 @@ by KATOH Yasufumi <karma at jazz.email.ne.jp>
         </varlistentry>
         <varlistentry>
           <term>
-            <option>lxc.init_gid</option>
+            <option>lxc.init.gid</option>
           </term>
           <listitem>
             <para>
index e41c1a782fa7bed9e39069f384cdf7fcd125e706..8f5d1723882d63dc583c74631049e2fe9f76673d 100644 (file)
@@ -556,12 +556,12 @@ rootfs
        command into the container.
        The pid of the first process is 1. If no command is
        specified <command>lxc-start</command> will
-       run the command defined in lxc.init_cmd or if not set,
+       run the command defined in lxc.init.cmd or if not set,
        <filename>/sbin/init</filename> .
         -->
         <command>lxc-start</command> コマンドは、コンテナ内の特定のコマンドを直接実行します。
         最初のプロセスの pid が 1 となります。
-        もし、実行するコマンドが指定されない場合は、<command>lxc-start</command> は lxc.init_cmd で設定されたコマンドを実行します。もし lxc.init_cmd が設定されていない場合は <filename>/sbin/init</filename> を実行します。
+        もし、実行するコマンドが指定されない場合は、<command>lxc-start</command> は lxc.init.cmd で設定されたコマンドを実行します。もし lxc.init.cmd が設定されていない場合は <filename>/sbin/init</filename> を実行します。
       </para>
 
       <para>
index a507747f314df343ba40cf727ca97afab1914614..5001995a8771381ab6f789ff6fca5680b2b24ae6 100644 (file)
@@ -95,11 +95,11 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>
     <para>
       <!--
       If no command is specified, <command>lxc-start</command> will
-      use the command defined in lxc.init_cmd or if not set, the default
+      use the command defined in lxc.init.cmd or if not set, the default
       <command>"/sbin/init"</command> command to run a system
       container.
       -->
-      만약 명령어가 지정되지 않았다면, <command>lxc-start</command>는 lxc.init_cmd에 정의된 명령어를 사용한다. 만약 그마저도 없다면 <command>"/sbin/init"</command>명령어를 사용한다.
+      만약 명령어가 지정되지 않았다면, <command>lxc-start</command>는 lxc.init.cmd에 정의된 명령어를 사용한다. 만약 그마저도 없다면 <command>"/sbin/init"</command>명령어를 사용한다.
     </para>
 
   </refsect1>
index af07f8cc78e16b3c087acaa8dc4363a4ed047532..9dba8a96a2851dd020eb2323aa3b1ccc8d09359e 100644 (file)
@@ -308,7 +308,7 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>
       <variablelist>
         <varlistentry>
           <term>
-            <option>lxc.init_cmd</option>
+            <option>lxc.init.cmd</option>
           </term>
           <listitem>
             <para>
@@ -343,7 +343,7 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>
       <variablelist>
         <varlistentry>
           <term>
-            <option>lxc.init_uid</option>
+            <option>lxc.init.uid</option>
           </term>
           <listitem>
             <para>
@@ -356,7 +356,7 @@ by Sungbae Yoo <sungbae.yoo at samsung.com>
         </varlistentry>
         <varlistentry>
           <term>
-            <option>lxc.init_gid</option>
+            <option>lxc.init.gid</option>
           </term>
           <listitem>
             <para>
index 45e4ed6d85a44cd459f0e441ac003040b935c5cf..1b9f979f23a90aa931ca63a0201e6463c34bc6ee 100644 (file)
@@ -542,10 +542,10 @@ rootfs
        command into the container.
        The pid of the first process is 1. If no command is
        specified <command>lxc-start</command> will
-       run the command defined in lxc.init_cmd or if not set,
+       run the command defined in lxc.init.cmd or if not set,
        <filename>/sbin/init</filename> .
         -->
-        <command>lxc-start</command> 명령어는 지정한 명령어를 컨테이너 내에서 직접 실행한다. 첫 프로세스의 pid는 1번이다. 만약 어떤 명령어도 지정되지 않으면, lxc.init_cmd에 지정된 명령어를 실행한다. 이마저도 지정되있지 않으면, <filename>/sbin/init</filename>를 실행한다.
+        <command>lxc-start</command> 명령어는 지정한 명령어를 컨테이너 내에서 직접 실행한다. 첫 프로세스의 pid는 1번이다. 만약 어떤 명령어도 지정되지 않으면, lxc.init.cmd에 지정된 명령어를 실행한다. 이마저도 지정되있지 않으면, <filename>/sbin/init</filename>를 실행한다.
       </para>
 
       <para>
index 1770ac2ce788bc46e93e5ec681c0e41b1befadfd..1f6fbb741926b746e8d8c35c32c78cda9fe39a0c 100644 (file)
@@ -80,7 +80,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
     </para>
     <para>
       If no command is specified, <command>lxc-start</command> will
-      use the command defined in lxc.init_cmd or if not set, the default
+      use the command defined in lxc.init.cmd or if not set, the default
       <command>"/sbin/init"</command> command to run a system
       container.
     </para>
index d4581587a73697db79b9cd6287288fe9ac8366bc..cf47e1224d44b981e076ac74d5b12cf23495d42c 100644 (file)
@@ -263,7 +263,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
       <variablelist>
         <varlistentry>
           <term>
-            <option>lxc.init_cmd</option>
+            <option>lxc.init.cmd</option>
           </term>
           <listitem>
             <para>
@@ -287,7 +287,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
       <variablelist>
         <varlistentry>
           <term>
-            <option>lxc.init_uid</option>
+            <option>lxc.init.uid</option>
           </term>
           <listitem>
             <para>
@@ -297,7 +297,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
         </varlistentry>
         <varlistentry>
           <term>
-            <option>lxc.init_gid</option>
+            <option>lxc.init.gid</option>
           </term>
           <listitem>
             <para>
index 1b98b47e198499ca6e1e480d84fadb9afc63f7dc..a068d2c1205f022abfd6e2d407100b1ac34e2cf8 100644 (file)
@@ -376,7 +376,7 @@ rootfs
        command into the container.
        The pid of the first process is 1. If no command is
        specified <command>lxc-start</command> will
-       run the command defined in lxc.init_cmd or if not set,
+       run the command defined in lxc.init.cmd or if not set,
        <filename>/sbin/init</filename> .
       </para>
 
index 58a98e541d7fb927715f9418f27296f4d96d4825..df2a5056a7b9f4238f9c06f6a54a84c0d7ea81bf 100644 (file)
@@ -226,18 +226,20 @@ static struct lxc_config_t config[] = {
        { "lxc.monitor.unshare",           set_config_monitor,                     get_config_monitor,                     clr_config_monitor,                   },
        { "lxc.group",                     set_config_group,                       get_config_group,                       clr_config_group,                     },
        { "lxc.environment",               set_config_environment,                 get_config_environment,                 clr_config_environment,               },
-       { "lxc.init_cmd",                  set_config_init_cmd,                    get_config_init_cmd,                    clr_config_init_cmd,                  },
-       { "lxc.init_uid",                  set_config_init_uid,                    get_config_init_uid,                    clr_config_init_uid,                  },
-       { "lxc.init_gid",                  set_config_init_gid,                    get_config_init_gid,                    clr_config_init_gid,                  },
        { "lxc.ephemeral",                 set_config_ephemeral,                   get_config_ephemeral,                   clr_config_ephemeral,                 },
        { "lxc.syslog",                    set_config_syslog,                      get_config_syslog,                      clr_config_syslog,                    },
        { "lxc.no_new_privs",              set_config_no_new_privs,                get_config_no_new_privs,                clr_config_no_new_privs,              },
 
-       /* REMOVE IN LXC 3.0
-          legacy keys
-        */
+       /* REMOVE IN LXC 3.0: legacy keys  [START]*/
+       { "lxc.init_cmd",                  set_config_init_cmd,                    get_config_init_cmd,                    clr_config_init_cmd,                  },
+       { "lxc.init_uid",                  set_config_init_uid,                    get_config_init_uid,                    clr_config_init_uid,                  },
+       { "lxc.init_gid",                  set_config_init_gid,                    get_config_init_gid,                    clr_config_init_gid,                  },
        { "lxc.limit",                     set_config_limit,                       get_config_limit,                       clr_config_limit,                     },
+       /* REMOVE IN LXC 3.0: legacy keys  [END]*/
 
+       { "lxc.init.cmd",                  set_config_init_cmd,                    get_config_init_cmd,                    clr_config_init_cmd,                  },
+       { "lxc.init.uid",                  set_config_init_uid,                    get_config_init_uid,                    clr_config_init_uid,                  },
+       { "lxc.init.gid",                  set_config_init_gid,                    get_config_init_gid,                    clr_config_init_gid,                  },
        { "lxc.prlimit",                   set_config_prlimit,                     get_config_prlimit,                     clr_config_prlimit,                   },
 };
 
index 3cf5a67cac3c038d8348e78284c352d84cef65e9..815553f780645b371c4076dcd3816e19bfaed093 100644 (file)
@@ -694,27 +694,54 @@ int main(int argc, char *argv[])
                goto non_test_error;
        }
 
-       /* lxc.init_cmd */
+       /* REMOVE IN LXC 3.0
+          legacy lxc.init_cmd key
+        */
        if (set_get_compare_clear_save_load(c, "lxc.init_cmd", "/bin/bash",
                                            tmpf, true) < 0) {
                lxc_error("%s\n", "lxc.init_cmd");
                goto non_test_error;
        }
 
-       /* lxc.init_uid */
+       /* lxc.init.cmd */
+       if (set_get_compare_clear_save_load(c, "lxc.init.cmd", "/bin/bash",
+                                           tmpf, true) < 0) {
+               lxc_error("%s\n", "lxc.init.cmd");
+               goto non_test_error;
+       }
+
+       /* REMOVE IN LXC 3.0
+          legacy lxc.init_uid key
+        */
        if (set_get_compare_clear_save_load(c, "lxc.init_uid", "1000", tmpf,
                                            true) < 0) {
                lxc_error("%s\n", "lxc.init_uid");
                goto non_test_error;
        }
 
-       /* lxc.init_gid */
+       /* lxc.init.uid */
+       if (set_get_compare_clear_save_load(c, "lxc.init.uid", "1000", tmpf,
+                                           true) < 0) {
+               lxc_error("%s\n", "lxc.init.uid");
+               goto non_test_error;
+       }
+
+       /* REMOVE IN LXC 3.0
+          legacy lxc.init_gid key
+        */
        if (set_get_compare_clear_save_load(c, "lxc.init_gid", "1000", tmpf,
                                            true) < 0) {
                lxc_error("%s\n", "lxc.init_gid");
                goto non_test_error;
        }
 
+       /* lxc.init.gid */
+       if (set_get_compare_clear_save_load(c, "lxc.init.gid", "1000", tmpf,
+                                           true) < 0) {
+               lxc_error("%s\n", "lxc.init.gid");
+               goto non_test_error;
+       }
+
        /* lxc.ephemeral */
        if (set_get_compare_clear_save_load(c, "lxc.ephemeral", "1", tmpf,
                                            true) < 0) {