Actually check the mtime when it's not optional.
[util-vserver.git] / scripts / functions
index d15cd41..0edb7a3 100644 (file)
@@ -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 )
@@ -844,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