瀏覽代碼

check_pps.sh: warning and exit when sysfs and procfs are not present

Jon Schipp 12 年之前
父節點
當前提交
d3df576bb8
共有 1 個文件被更改,包括 6 次插入0 次删除
  1. 6 0
      check_pps.sh

+ 6 - 0
check_pps.sh

@@ -107,6 +107,12 @@ WARN=0
 CRIT=0
 ARGC=$#
 
+# Check for dependency filesystems
+if ! [ -d /sys ] || ! [ -d /proc ]; then
+	echo "$0 requires sysfs and procfs"
+	exit $UNKNOWN
+fi
+
 # Print warning and exit if less than n arguments specified
 argcheck 1