projects
/
openwrt
/
svn-archive
/
openwrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bae21d4
)
add a check to see if an init script is enabled
author
Felix Fietkau
<nbd@openwrt.org>
Fri, 8 Dec 2006 17:56:05 +0000
(17:56 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Fri, 8 Dec 2006 17:56:05 +0000
(17:56 +0000)
SVN-Revision: 5727
openwrt/package/base-files/default/etc/rc.common
patch
|
blob
|
history
diff --git
a/openwrt/package/base-files/default/etc/rc.common
b/openwrt/package/base-files/default/etc/rc.common
index 8b478f0dcc4f0182e6ce34b81b7ae17fc0a38274..ef944b5ae74d08741e8da74785f4c5122fa2e34d 100755
(executable)
--- a/
openwrt/package/base-files/default/etc/rc.common
+++ b/
openwrt/package/base-files/default/etc/rc.common
@@
-41,6
+41,11
@@
enable() {
ln -s "/etc/init.d/$name" "$IPKG_INSTROOT/etc/init.d/S${START}${name##S[0-9][0-9]}"
}
+enabled() {
+ name="$(basename "${initscript}")"
+ [ -x "$IPKG_INSTROOT/etc/init.d/S${START}${name##S[0-9][0-9]}" ]
+}
+
depends() {
return 0
}
@@
-77,6
+82,7
@@
eval "case \"\$action\" in
boot) boot;;
shutdown) shutdown;;
enable) enable;;
+ enabled) enabled;;
disable) disable;;
$cmds
*) help;;