Update upstart check in sysvinit to be exactly the same as the init_is_upstart function from /lib/lsb/init-functions (which isn't available in 12.04 or we'd use it directly)

This commit is contained in:
Tianon Gravi 2013-11-11 11:57:25 -07:00
parent 5fe4c9a39a
commit 88edba7e86
1 changed files with 2 additions and 1 deletions

View File

@ -29,7 +29,8 @@ if [ -f /etc/default/$BASE ]; then
. /etc/default/$BASE
fi
if which initctl >/dev/null && initctl version | grep -q upstart; then
# see also init_is_upstart in /lib/lsb/init-functions (which isn't available in Ubuntu 12.04, or we'd use it)
if [ -x /sbin/initctl ] && /sbin/initctl version 2>/dev/null | /bin/grep -q upstart; then
log_failure_msg "Docker is managed via upstart, try using service $BASE $1"
exit 1
fi