From bd32bd0953d3075b21586df15abee23f22eb99c7 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 20 Jan 2012 12:58:50 +0100 Subject: [PATCH] setup state in os specific sections to get better overview Signed-off-by: Nico Schottelius --- conf/type/__start_on_boot/explorer/state | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/conf/type/__start_on_boot/explorer/state b/conf/type/__start_on_boot/explorer/state index 1de1fe57..ff092a65 100755 --- a/conf/type/__start_on_boot/explorer/state +++ b/conf/type/__start_on_boot/explorer/state @@ -25,8 +25,6 @@ os=$("$__explorer/os") runlevel=$("$__explorer/runlevel") name="$__object_id" -# default -state="present" case "$os" in archlinux) @@ -44,21 +42,23 @@ case "$os" in state="absent" fi done - ;; + ;; debian|ubuntu) + state="present" [ -f "/etc/rc$runlevel.d/S"??"$name" ] || state="absent" - ;; + ;; centos|fedora|owl|redhat) + state="present" state=$(chkconfig --level "$runlevel" \"$name\" || echo absent) [ "$state" ] || state="present" - ;; + ;; *) echo "Unsupported os: $os" >&2 exit 1 - ;; + ;; esac echo $state