forked from ungleich-public/cdist
add debian / ubuntu support for checking state
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
parent
fe0fae6902
commit
559670ab4f
1 changed files with 9 additions and 1 deletions
|
@ -21,12 +21,19 @@
|
|||
# Check whether the given name will be started on boot or not
|
||||
#
|
||||
|
||||
set -x
|
||||
exec >&2
|
||||
|
||||
os=$("$__explorer/os")
|
||||
runlevel=$("$__explorer/runlevel")
|
||||
name="$__object_id"
|
||||
|
||||
# default
|
||||
state="present"
|
||||
|
||||
case "$os" in
|
||||
debian|ubuntu)
|
||||
echo update-rc.d \"$name\" defaults
|
||||
[ -f "/etc/rc$runlevel.d/S"??"$name" ] || state="absent"
|
||||
;;
|
||||
|
||||
gentoo)
|
||||
|
@ -45,3 +52,4 @@ case "$os" in
|
|||
esac
|
||||
|
||||
echo $state
|
||||
exit 1
|
||||
|
|
Loading…
Reference in a new issue