projects
/
openwrt
/
staging
/
ansuel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4bead05
)
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
package/base-files/files/etc/rc.common
patch
|
blob
|
history
diff --git
a/package/base-files/files/etc/rc.common
b/package/base-files/files/etc/rc.common
index 7180b0f7fa9188c05a94d33881c0668060b89a6d..1e6c5e912b6c645c56e547345eb5c318bd599c69 100755
(executable)
--- a/
package/base-files/files/etc/rc.common
+++ b/
package/base-files/files/etc/rc.common
@@
-41,6
+41,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
+82,7
@@
eval "case \"\$action\" in
boot) boot;;
shutdown) shutdown;;
enable) enable;;
+ enabled) enabled;;
disable) disable;;
$cmds
*) help;;