Merge branch 'bugfix__start_on_boot' of https://github.com/dheule/cdist
This commit is contained in:
commit
386a84eafc
1 changed files with 10 additions and 1 deletions
|
@ -39,10 +39,19 @@ case "$os" in
|
|||
[ -f "/etc/rc$runlevel.d/S"??"$name" ] || state="absent"
|
||||
;;
|
||||
|
||||
amazon|centos|fedora|owl|redhat|suse)
|
||||
amazon|centos|fedora|owl|redhat)
|
||||
state=$(chkconfig --level "$runlevel" "$name" || echo absent)
|
||||
[ "$state" ] || state="present"
|
||||
;;
|
||||
suse)
|
||||
# check for target if set, usable for boot. services in runlevel B
|
||||
if [ "$target_runlevel" != 'default' ]; then
|
||||
runlevel="$target_runlevel"
|
||||
fi
|
||||
# suses chkconfig has the same name, but works different ...
|
||||
state=$(chkconfig --check "$name" "$runlevel" || echo absent)
|
||||
[ "$state" ] || state="present"
|
||||
;;
|
||||
gentoo)
|
||||
state="present"
|
||||
[ -f "/etc/runlevels/${target_runlevel}/${name}" ] || state="absent"
|
||||
|
|
Loading…
Reference in a new issue