Rename flags to cflags.
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Tue, 28 Oct 2008 00:23:26 +0000 (00:23 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Tue, 28 Oct 2008 00:23:26 +0000 (00:23 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2800 94cd875c-1c1d-0410-91d2-eb244daf1a30

doc/configuration.xml
scripts/vserver-setup.functions
scripts/vserver.functions

index fe9bfe6..4133052 100644 (file)
@@ -616,51 +616,17 @@ is the personality-type followed by flags (one item per line). See
 values.
       </description>
     </list>
-    <list name="flags">
+    <list name="cflags" id="cflags" since="0.30.216">
       <description>
 Contains per line a flag. See <ulink
 url="http://svn.linux-vserver.org/svn/util-vserver/trunk/lib/cflags-v13.c">lib/cflags-v13.c</ulink>
 for possible values.
       </description>
-      <!--
-      <elements>
-       <element name="fakeinit">
-         <description>
-The new process will believe it is process number 1. Useful to run a
-real /sbin/init in a vserver. Warning: this flag should not be used
-unless you know what you are doing. Often, it is better to use the
-'plain' initstyle.
-          </description>
-       </element>
-       <element name="lock">
-         <description>
-The new process is trapped and can't use chcontext anymore.
-          </description>
-       </element>
-       <element name="sched">
-         <description>
-The new process and its children will share a common
-          </description>
-       </element>
-       <element name="nproc">
-         <description>
-Limit the number of process in the vserver according to
-ulimit setting. Normally, ulimit is a per user thing.
-With this flag, it becomes a per vserver thing.
-          </description>
-       </element>
-       <element name="private">
-         <description>
-No one can join this security context once created.
-          </description>
-       </element>
-       <element name="ulimit">
-         <description>
-Apply the current ulimit to the whole context
-          </description>
-       </element>
-      </elements>
-      -->
+    </list>
+    <list name="flags">
+      <description>
+Old name for <optionref>cflags</optionref>. Deprecated.
+      </description>
     </list>
     <list name="nflags" since="0.30.212">
       <description>
index 0122b18..b535203 100644 (file)
@@ -220,7 +220,7 @@ function setup_writeOption
 
     test -z "$SETUP_FLAGS" || for i in "${SETUP_FLAGS[@]}"; do
        echo "$i"
-    done >"$cfgdir"/flags
+    done >"$cfgdir"/cflags
 
     ln -s "$SETUP_LOCKFILE"   "$cfgdir"/run
 }
index 0997c2e..a4dc8ed 100644 (file)
@@ -381,10 +381,12 @@ function _generateInitOptions
 function _generateFlagOptions
 {
     local vdir=$1
+    local file
 
     CHCONTEXT_FLAG_OPTS=()
 
-    test ! -e "$vdir"/flags || \
+    findFile file "$vdir"/cflags "$vdir"/flags ""
+    test -z "$file" || \
     while read flag; do
        case x"$flag" in
            (x|x\#*)            ;;
@@ -398,7 +400,7 @@ function _generateFlagOptions
                                      --flag "$flag" )
                ;;
        esac
-    done <"$vdir"/flags
+    done <"$file"
 
     isAvoidNamespace "$vdir" || {
        USE_VNAMESPACE=1