projects
/
oweals
/
openwrt.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7a20688
)
base-files: warn when calling /etc/init.d/<script> enable and neither START nor STOP...
author
Felix Fietkau
<nbd@openwrt.org>
Wed, 27 Jul 2011 09:02:10 +0000
(09:02 +0000)
committer
Felix Fietkau
<nbd@openwrt.org>
Wed, 27 Jul 2011 09:02:10 +0000
(09:02 +0000)
SVN-Revision: 27797
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 6ec88aef9c1e20040bb605235207f0ca0d4ee79b..5bf357b9a89050440e02d910af4234d0e8a74685 100755
(executable)
--- a/
package/base-files/files/etc/rc.common
+++ b/
package/base-files/files/etc/rc.common
@@
-42,6
+42,10
@@
disable() {
enable() {
name="$(basename "${initscript}")"
disable
+ [ -n "$START" -o -n "$STOP" ] || {
+ echo "/etc/init.d/$name does not have a START or STOP value"
+ return 1
+ }
[ "$START" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}"
[ "$STOP" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}"
}