Merge "Fix dib-init-system for Debian Jessie and Debian Stretch"

This commit is contained in:
Jenkins 2017-03-13 03:29:41 +00:00 committed by Gerrit Code Review
commit 8b19f7f99d
2 changed files with 10 additions and 1 deletions

View File

@ -6,7 +6,10 @@ fi
set -eu set -eu
set -o pipefail set -o pipefail
if [[ -f /usr/bin/systemctl ]]; then # Debian Jessie and Debian Stretch use /bin/systemctl.
# (/sbin/init is only available if systemd-sysv is installed.)
if [ -f /usr/bin/systemctl -o -f /bin/systemctl ]; then
echo "systemd" echo "systemd"
elif [[ -f /sbin/initctl ]]; then elif [[ -f /sbin/initctl ]]; then
echo "upstart" echo "upstart"

View File

@ -0,0 +1,6 @@
---
fixes:
- dib-init-system did not correctly find the
init system for Debian Jessie and Debian Stretch.
This version also looks for /bin/systemctl as
as hint for systemd and fixes the problem.