use different files for 'bcap' and 'ccap' for now
[util-vserver.git] / util-vserver / scripts / vserver.functions
index 3d0def0..9e92c98 100644 (file)
@@ -90,6 +90,36 @@ function _generateNiceCommand
     NICE_CMD=( $_NICE -$nice )
 }
 
+function _generateCCapabilityOptions
+{
+    local vdir=$1
+    local cap
+    local f="$vdir"/ccapabilities
+    
+    test -e "$f" || return 0
+    while read cap; do
+       case x"$cap" in
+           x|x#)       ;;
+           *)          OPTS_VATTRIBUTE=( "${OPTS_VATTRIBUTE[@]}" --ccap "$cap" );;
+       esac
+    done <"$f"
+}
+
+function _generateBCapabilityOptions
+{
+    local vdir=$1
+    local cap
+    local f="$vdir"/bcapabilities
+    
+    test -e "$f" || return 0
+    while read cap; do
+       case x"$cap" in
+           x|x#)       ;;
+           *)          OPTS_VATTRIBUTE=( "${OPTS_VATTRIBUTE[@]}" --bcap "$cap" );;
+       esac
+    done <"$f"
+}
+
 function _generateCapabilityOptions
 {
     local vdir=$1
@@ -347,7 +377,11 @@ function _processSingleInterface
 
     test "$ip" || { echo $"Can not read ip for '$iface'"  >&2; return 1; }
     
-    test ! -e "$iface"/only_ip   || unset dev
+    test ! -e "$iface"/only_ip || {
+       echo $"The 'only_ip' flag for interface '$iface' is deprecated; use 'nodev' instead of" >&2
+       unset dev
+    }
+    test ! -e "$iface"/nodev   || unset dev
     
     if test "$dev"; then
        _transformMask2Prefix prefix "$prefix" "$mask"