mirror of
https://github.com/hak5/wifipineapple-openwrt.git
synced 2025-10-29 16:57:19 +00:00
add a check to see if an init script is enabled
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@5727 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
d6b8219de1
commit
6c20cfaf1d
@ -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;;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user