]> arthur.barton.de Git - netdata.git/blobdiff - installer/functions.sh
fix minor installer issues on freebsd
[netdata.git] / installer / functions.sh
index 02b061d81999e470370ff250f46db194c4dbe7a5..f27b4535b28284dfd8f968ba1a88832d960d28a1 100644 (file)
@@ -265,8 +265,8 @@ iscontainer() {
 
     # /proc/1/sched exposes the host's pid of our init !
     # http://stackoverflow.com/a/37016302
-    local pid=$( cat /proc/1/sched | head -n 1 | { IFS='(),#:' read name pid th threads; echo $pid; } )
-    local p=$(( pid + 0 ))
+    local pid=$( cat /proc/1/sched 2>/dev/null | head -n 1 | { IFS='(),#:' read name pid th threads; echo $pid; } )
+    pid=$(( pid + 0 ))
     [ ${pid} -ne 1 ] && return 0
 
     # lxc sets environment variable 'container'