diff --git a/conf/type/__start_on_boot/explorer/state b/conf/type/__start_on_boot/explorer/state index ff092a65..d1998e22 100755 --- a/conf/type/__start_on_boot/explorer/state +++ b/conf/type/__start_on_boot/explorer/state @@ -44,7 +44,7 @@ case "$os" in done ;; - debian|ubuntu) + debian|ubuntu|openwrt) state="present" [ -f "/etc/rc$runlevel.d/S"??"$name" ] || state="absent" ;; diff --git a/conf/type/__start_on_boot/gencode-remote b/conf/type/__start_on_boot/gencode-remote index be2bd98b..cefdc385 100755 --- a/conf/type/__start_on_boot/gencode-remote +++ b/conf/type/__start_on_boot/gencode-remote @@ -47,6 +47,13 @@ case "$state_should" in echo chkconfig \"$name\" on ;; + openwrt) + # 'enable' can be successful and still return a non-zero exit + # code, deal with it by checking for success ourselves in that + # case (the || ... part). + echo "/etc/init.d/\"$name\" enable || [ -f /etc/rc.d/S??\"$name\" ]" + ;; + *) echo "Unsupported os: $os" >&2 exit 1 @@ -74,6 +81,10 @@ case "$state_should" in echo chkconfig \"$name\" off ;; + openwrt) + echo "\"/etc/init.d/$name\" disable" + ;; + *) echo "Unsupported os: $os" >&2 exit 1