diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-07-27 09:02:10 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2011-07-27 09:02:10 +0000 |
commit | 2ed51448ae64a1c4883ce7c76befce1f357b457e (patch) | |
tree | 331c1b3e48cd87a05d458a0796132e7761adb413 /package/base-files/files | |
parent | d572d07324ac143c835ad8eef1b0c2b8eab52fca (diff) |
base-files: warn when calling /etc/init.d/<script> enable and neither START nor STOP is defined
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@27797 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-x | package/base-files/files/etc/rc.common | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/package/base-files/files/etc/rc.common b/package/base-files/files/etc/rc.common index 6ec88aef9..5bf357b9a 100755 --- 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]}" } |