From 745f1e2984655c85772d614782853bb66e12bf8c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Tue, 10 Feb 2015 23:27:43 +0100 Subject: [PATCH] support ubuntu upstart in __start_on_boot Signed-off-by: Nico Schottelius --- cdist/conf/type/__start_on_boot/explorer/state | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cdist/conf/type/__start_on_boot/explorer/state b/cdist/conf/type/__start_on_boot/explorer/state index e9e4318e..1906033c 100755 --- a/cdist/conf/type/__start_on_boot/explorer/state +++ b/cdist/conf/type/__start_on_boot/explorer/state @@ -1,6 +1,6 @@ #!/bin/sh # -# 2012-2013 Nico Schottelius (nico-cdist at schottelius.org) +# 2012-2015 Nico Schottelius (nico-cdist at schottelius.org) # 2013 Daniel Heule (hda at sfs.biz) # # This file is part of cdist. @@ -34,10 +34,15 @@ case "$os" in || echo absent) ;; - debian|ubuntu|openwrt) + debian|openwrt) state="present" [ -f "/etc/rc$runlevel.d/S"??"$name" ] || state="absent" ;; + ubuntu) + state="absent" + [ -f "/etc/rc$runlevel.d/S"??"$name" ] && state="present" + [ -f "/etc/init/${name}.conf" ] && state="present" + ;; amazon|centos|fedora|owl|redhat) state=$(chkconfig --level "$runlevel" "$name" || echo absent)