mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-08-23 06:30:14 +03:00
add K* scripts to be run at shutdown
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7163 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
f53270adf1
commit
38a2e4b392
@ -2,6 +2,8 @@
|
|||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
START=40
|
START=40
|
||||||
|
STOP=40
|
||||||
|
|
||||||
boot() {
|
boot() {
|
||||||
setup_switch() { return 0; }
|
setup_switch() { return 0; }
|
||||||
|
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) 2006 OpenWrt.org
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
(
|
{
|
||||||
for i in /etc/rc.d/S*; do
|
for i in /etc/rc.d/$1*; do
|
||||||
$i boot 2>&1
|
$i $2 2>&1
|
||||||
done
|
done
|
||||||
|
} | logger -s -p 6 -t '' &
|
||||||
sysctl -p >&-
|
|
||||||
) | logger -s -p 6 -t '' &
|
|
||||||
|
7
package/base-files/files/etc/init.d/sysctl
Executable file
7
package/base-files/files/etc/init.d/sysctl
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh /etc/rc.common
|
||||||
|
# Copyright (C) 2006 OpenWrt.org
|
||||||
|
|
||||||
|
START=99
|
||||||
|
start() {
|
||||||
|
[ -f /etc/sysctl.conf ] && sysctl -p >&-
|
||||||
|
}
|
@ -1,3 +1,4 @@
|
|||||||
::sysinit:/etc/init.d/rcS
|
::sysinit:/etc/init.d/rcS S boot
|
||||||
|
::shutdown:/etc/init.d/rcS K stop
|
||||||
tts/0::askfirst:/bin/ash --login
|
tts/0::askfirst:/bin/ash --login
|
||||||
ttyS0::askfirst:/bin/ash --login
|
ttyS0::askfirst:/bin/ash --login
|
||||||
|
@ -12,4 +12,3 @@ alias more=less
|
|||||||
|
|
||||||
arp() { cat /proc/net/arp; }
|
arp() { cat /proc/net/arp; }
|
||||||
[ -z /bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
|
[ -z /bin/ldd ] || ldd() { LD_TRACE_LOADED_OBJECTS=1 $*; }
|
||||||
reboot() { ifdown wan 2>&1 >/dev/null ; /sbin/reboot; }
|
|
||||||
|
@ -40,6 +40,7 @@ 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]}"
|
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]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
enabled() {
|
enabled() {
|
||||||
|
Loading…
Reference in New Issue
Block a user