|
|
|
@ -1,6 +1,7 @@ |
|
|
|
|
#!/bin/sh |
|
|
|
|
# |
|
|
|
|
# 2012-2013 Nico Schottelius (nico-cdist at schottelius.org) |
|
|
|
|
# 2013 Daniel Heule (hda at sfs.biz) |
|
|
|
|
# |
|
|
|
|
# This file is part of cdist. |
|
|
|
|
# |
|
|
|
@ -21,6 +22,7 @@ |
|
|
|
|
|
|
|
|
|
state_should="$(cat "$__object/parameter/state")" |
|
|
|
|
state_is=$(cat "$__object/explorer/state") |
|
|
|
|
target_runlevel="$(cat "$__object/parameter/target_runlevel")" |
|
|
|
|
|
|
|
|
|
# Short circuit if nothing is to be done |
|
|
|
|
[ "$state_should" = "$state_is" ] && exit 0 |
|
|
|
@ -38,10 +40,9 @@ case "$state_should" in |
|
|
|
|
echo "update-rc.d \"$name\" defaults >/dev/null" |
|
|
|
|
;; |
|
|
|
|
|
|
|
|
|
# FIXME: Disabled until the explorer is checked |
|
|
|
|
# gentoo) |
|
|
|
|
# echo rc-update add \"$name\" default |
|
|
|
|
# ;; |
|
|
|
|
gentoo) |
|
|
|
|
echo rc-update add \"$name\" \"$target_runlevel\" |
|
|
|
|
;; |
|
|
|
|
|
|
|
|
|
amazon|centos|fedora|owl|redhat|suse) |
|
|
|
|
echo chkconfig \"$name\" on |
|
|
|
@ -70,10 +71,9 @@ case "$state_should" in |
|
|
|
|
echo update-rc.d -f \"$name\" remove |
|
|
|
|
;; |
|
|
|
|
|
|
|
|
|
# FIXME: Disabled until the explorer is checked |
|
|
|
|
# gentoo) |
|
|
|
|
# echo rc-update del \"$name\" |
|
|
|
|
# ;; |
|
|
|
|
gentoo) |
|
|
|
|
echo rc-update del \"$name\" \"$target_runlevel\" |
|
|
|
|
;; |
|
|
|
|
|
|
|
|
|
centos|fedora|owl|redhat|suse) |
|
|
|
|
echo chkconfig \"$name\" off |
|
|
|
|