diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-03-04 23:47:09 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-03-04 23:47:09 +0200 |
commit | 89c66bc7389a037231eebc0085bb1d083aaac469 (patch) | |
tree | 61fac67f54a790848c23b8a45411478fa083d381 /installer | |
parent | acba169f8c294db344b8ef2b62881a7da519e38f (diff) |
fix minor installer issues on freebsd
Diffstat (limited to 'installer')
-rw-r--r-- | installer/functions.sh | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/installer/functions.sh b/installer/functions.sh index 02b061d819..f27b4535b2 100644 --- a/installer/functions.sh +++ b/installer/functions.sh @@ -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' |