suses chkconfig has the same name, but works different

This commit is contained in:
Daniel Heule 2014-01-07 17:31:45 +01:00
parent 241d8e6c3a
commit f5cee7a57d

View file

@ -39,10 +39,19 @@ case "$os" in
[ -f "/etc/rc$runlevel.d/S"??"$name" ] || state="absent" [ -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=$(chkconfig --level "$runlevel" "$name" || echo absent)
[ "$state" ] || state="present" [ "$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) gentoo)
state="present" state="present"
[ -f "/etc/runlevels/${target_runlevel}/${name}" ] || state="absent" [ -f "/etc/runlevels/${target_runlevel}/${name}" ] || state="absent"