fix systemd detection; fixes #4421 (#4423)
Costa Tsaousis committed
Oct 22, 2018 at 20:09 UTC
35fa43068efd975712476a321b1b4c9939ee9c9f
1 file changed
+3
-4
installer/functions.sh
+3
-4
@@ -452,10 +452,9 @@ issystemd() {
452
# if pid 1 is systemd, it is systemd
453
[ "$(basename $(readlink /proc/1/exe) 2>/dev/null)" = "systemd" ] && return 0
454
455
- # -- ubuntu runs systemd as init ---
456
- ## if systemd is not running, it is not systemd
457
- #pids=$(pidof systemd 2>/dev/null)
458
- #[ -z "${pids}" ] && return 1
455
+ # if systemd is not running, it is not systemd
456
+ pids=$(pidof systemd 2>/dev/null)
457
+ [ -z "${pids}" ] && return 1
458
459
# check if the running systemd processes are not in our namespace
460
myns="$(readlink /proc/self/ns/pid 2>/dev/null)"