From 559670ab4f333b44831c29e18b70ab442275b8d9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 18 Jan 2012 16:15:53 +0100 Subject: [PATCH] add debian / ubuntu support for checking state Signed-off-by: Nico Schottelius --- conf/type/__start_on_boot/explorer/state | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/conf/type/__start_on_boot/explorer/state b/conf/type/__start_on_boot/explorer/state index 8db4b9d2..2778e784 100755 --- a/conf/type/__start_on_boot/explorer/state +++ b/conf/type/__start_on_boot/explorer/state @@ -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