X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=scripts%2Ffunctions;h=0edb7a3e73c3f210540d1c97c19cb6c43fdb5693;hb=c0b357aaa9c76cac72dfe34ad83992632d6666d7;hp=61dbd00ce5ffb5bd397f9d5f1b2f14652bdf77d5;hpb=fff63d0d7b11df1c17e1285ef82745221e1bd188;p=util-vserver.git diff --git a/scripts/functions b/scripts/functions index 61dbd00..0edb7a3 100644 --- a/scripts/functions +++ b/scripts/functions @@ -571,7 +571,7 @@ function _getProcNumberCount # Use /proc/virtual from kernel 2.6 when possible if test -d "/proc/virtual"; then - set -- $($_GREP '^PROC:' "/proc/virtual/$1/limit" 2>/dev/null) + set -- $($_GREP '^Tasks:' "/proc/virtual/$1/status" 2>/dev/null) _gp_procnr_cnt=$2 else _gp_procnr_cnt=$($_VPS ax | $_AWK '{print $2}' | $_GREP -x "$1" | $_WC -l ) @@ -636,13 +636,17 @@ function getFileValue eval read "$_gfv_var" <"$_gfv_file" } -## Called as 'getFileArray ' +## Called as 'getFileArray +' function getFileArray { - test -r "$2" || return 1 - + local _gfa_var=$1 + local _gfa_file + shift + + findFile _gfa_file "$@" '' + test -n "$_gfa_file" -a -r "$_gfa_file" || return 0 local IFS=$_VS_NEWLINE - eval "$1"='( $(< "$2") )' + eval "$_gfa_var"='( $(< "$_gfa_file") )' } function checkComponents @@ -840,9 +844,11 @@ function vshelper.doSanityCheck vshelper=$(cat "$proc_file") $_CMP -s "$vshelper" "$_VSHELPER" || { + local readable="" + test -r "$vshelper" && readable=1 warnings=( "${warnings[@]}" $"The configured vshelper '$vshelper' does not match the 'vshelper' - script of the util-vserver package" + script of the util-vserver package.${readable:+ Maybe you have two versions installed?}" ) solution_disable=1 solution_sysctl=1