forked from ungleich-public/cdist
setup state in os specific sections to get better overview
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
parent
aae67652e9
commit
bd32bd0953
1 changed files with 6 additions and 6 deletions
|
@ -25,8 +25,6 @@ os=$("$__explorer/os")
|
||||||
runlevel=$("$__explorer/runlevel")
|
runlevel=$("$__explorer/runlevel")
|
||||||
name="$__object_id"
|
name="$__object_id"
|
||||||
|
|
||||||
# default
|
|
||||||
state="present"
|
|
||||||
|
|
||||||
case "$os" in
|
case "$os" in
|
||||||
archlinux)
|
archlinux)
|
||||||
|
@ -47,10 +45,12 @@ case "$os" in
|
||||||
;;
|
;;
|
||||||
|
|
||||||
debian|ubuntu)
|
debian|ubuntu)
|
||||||
|
state="present"
|
||||||
[ -f "/etc/rc$runlevel.d/S"??"$name" ] || state="absent"
|
[ -f "/etc/rc$runlevel.d/S"??"$name" ] || state="absent"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
centos|fedora|owl|redhat)
|
centos|fedora|owl|redhat)
|
||||||
|
state="present"
|
||||||
state=$(chkconfig --level "$runlevel" \"$name\" || echo absent)
|
state=$(chkconfig --level "$runlevel" \"$name\" || echo absent)
|
||||||
[ "$state" ] || state="present"
|
[ "$state" ] || state="present"
|
||||||
;;
|
;;
|
||||||
|
|
Loading…
Reference in a new issue