X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/05adaa9794e41d02870a74a1ed7ba58cc59b9286..7e450a1c869a5b227e3c91c4e71049059f1193e6:/package/base-files/files/etc/rc.common diff --git a/package/base-files/files/etc/rc.common b/package/base-files/files/etc/rc.common index 7180b0f7f..5d9ee8666 100755 --- a/package/base-files/files/etc/rc.common +++ b/package/base-files/files/etc/rc.common @@ -18,6 +18,7 @@ reload() { } restart() { + trap '' TERM stop start } @@ -41,6 +42,11 @@ enable() { ln -s "/etc/init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" } +enabled() { + name="$(basename "${initscript}")" + [ -x "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" ] +} + depends() { return 0 } @@ -77,6 +83,7 @@ eval "case \"\$action\" in boot) boot;; shutdown) shutdown;; enable) enable;; + enabled) enabled;; disable) disable;; $cmds *) help;;