Commit 297885df authored by Lucas Russo's avatar Lucas Russo

get-init-system.sh: poke systemd directories for chroot environ

parent bab2d737
...@@ -9,6 +9,10 @@ if [[ ${IS_UPSTART} =~ upstart ]]; then ...@@ -9,6 +9,10 @@ if [[ ${IS_UPSTART} =~ upstart ]]; then
echo "upstart"; echo "upstart";
elif [[ `systemctl` =~ -\.mount ]]; then elif [[ `systemctl` =~ -\.mount ]]; then
echo "systemd"; echo "systemd";
# If on chroot the above alternative will not work.
# Try poking a few systemd directories instead
elif [[ -f /usr/lib/systemd || -f /lib/systemd/systemd ]]; then
echo "systemd";
elif [[ -f /etc/init.d/cron && ! -h /etc/init.d/cron ]]; then elif [[ -f /etc/init.d/cron && ! -h /etc/init.d/cron ]]; then
echo "sysv-init"; echo "sysv-init";
else else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment