Hi,
while digging in the util-vserver source code I found a problem with
the handling of comments in several files under /etc/vserver/*
(bcapabilities, ccapabilities, capabilites, flags). The code that
tests if a line is a comment looks for '^#$', not '^#.*$'.

The attatched patch fixes this.

Cheers,
Christian 'Greek0' Aichinger
Index: svn/scripts/vserver.functions
===================================================================
--- svn/scripts/vserver.functions       (revision 147)
+++ svn/scripts/vserver.functions       (working copy)
@@ -140,7 +140,7 @@
     test -e "$f" || return 0
     while read cap; do
        case x"$cap" in
-           (x|x\#)     ;;
+           (x|x\#*)    ;;
            (*)         OPTS_VATTRIBUTE=( "[EMAIL PROTECTED]" --ccap "$cap" );;
        esac
     done <"$f"
@@ -155,7 +155,7 @@
     test -e "$f" || return 0
     while read cap; do
        case x"$cap" in
-           (x|x\#)     ;;
+           (x|x\#*)    ;;
            (*)         OPTS_VATTRIBUTE=( "[EMAIL PROTECTED]" --bcap "$cap" );;
        esac
     done <"$f"
@@ -176,7 +176,7 @@
 
     while read cap; do
        case x"$cap" in
-           (x|x\#)     ;;
+           (x|x\#*)    ;;
            (!CAP_SYSCHROOT)
                CAP_OPTS=( "[EMAIL PROTECTED]" --cap "$cap" )
                CAPCHROOT_OPTS=( "[EMAIL PROTECTED]" --nochroot )
@@ -328,7 +328,7 @@
     test ! -e "$vdir"/flags || \
     while read flag; do
        case x"$flag" in
-           (x|x\#)             ;;
+           (x|x\#*)            ;;
            (xnamespace)        ;;
            (xfakeinit)
                _IS_FAKEINIT=1

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Vserver mailing list
[email protected]
http://list.linux-vserver.org/mailman/listinfo/vserver

Reply via email to