diff --git a/cdist/conf/explorer/init b/cdist/conf/explorer/init index 3777b431..a9cdd0d3 100755 --- a/cdist/conf/explorer/init +++ b/cdist/conf/explorer/init @@ -18,7 +18,19 @@ # along with cdist. If not, see . # # -# Check whether the given name will be started on boot or not +# Returns the process name of pid 1 ( normaly the init system ) +# for example at linux this value is "init" or "systemd" in most cases # -ps -o comm= --pid 1 +uname_s="$(uname -s)" + +case "$uname_s" in + Linux|FreeBSD) + ps -o comm= -p 1 || true + exit 0 + ;; + *) + echo "init exlorer needs to be implemented for $os" >&2 + exit 1 + ;; +esac