START/STOP values must be specified in the init script

SVN-Revision: 7164
owl
Mike Baker 2007-05-10 10:38:53 +00:00
parent 291420a8f3
commit bef40307bb
6 changed files with 9 additions and 4 deletions

View File

@ -3,8 +3,6 @@
. $IPKG_INSTROOT/etc/functions.sh . $IPKG_INSTROOT/etc/functions.sh
START=50
start() { start() {
return 0 return 0
} }
@ -34,13 +32,14 @@ shutdown() {
disable() { disable() {
name="$(basename "${initscript}")" name="$(basename "${initscript}")"
rm -f "$IPKG_INSTROOT"/etc/rc.d/S??$name rm -f "$IPKG_INSTROOT"/etc/rc.d/S??$name
rm -f "$IPKG_INSTROOT"/etc/rc.d/K??$name
} }
enable() { enable() {
name="$(basename "${initscript}")" name="$(basename "${initscript}")"
disable disable
ln -s "/etc/init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" [ "$START" ] && ln -s "/etc/init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}"
[ "$STOP" ] && ln -s "/etc/init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${START}${name##K[0-9][0-9]}" [ "$STOP" ] && ln -s "/etc/init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${START}${name##K[0-9][0-9]}"
} }
enabled() { enabled() {

View File

@ -1,4 +1,6 @@
#!/bin/sh /etc/rc.common #!/bin/sh /etc/rc.common
START=50
stop() { stop() {
killall br2684ctl 2>/dev/null >/dev/null killall br2684ctl 2>/dev/null >/dev/null
sleep 1 sleep 1

View File

@ -1,5 +1,6 @@
#!/bin/sh /etc/rc.common #!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org # Copyright (C) 2006 OpenWrt.org
START=50
start () { start () {
mkdir -p /var/spool/cron mkdir -p /var/spool/cron

View File

@ -1,5 +1,6 @@
#!/bin/sh /etc/rc.common #!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org # Copyright (C) 2006 OpenWrt.org
START=50
start() { start() {
include /lib/network include /lib/network

View File

@ -1,5 +1,6 @@
#!/bin/sh /etc/rc.common #!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org # Copyright (C) 2006 OpenWrt.org
START=50
start() { start() {
if [ \! -f /etc/passwd ] || \ if [ \! -f /etc/passwd ] || \

View File

@ -1,5 +1,6 @@
#!/bin/sh /etc/rc.common #!/bin/sh /etc/rc.common
# Copyright (C) 2006 OpenWrt.org # Copyright (C) 2006 OpenWrt.org
START=50
# Copyright (C) 2006 Carlos Sobrinho # Copyright (C) 2006 Carlos Sobrinho
config_cb() { config_cb() {