add a check to see if an init script is enabled
SVN-Revision: 5727
This commit is contained in:
parent
4bead05b28
commit
9a5798e5f5
1 changed files with 6 additions and 0 deletions
|
@ -41,6 +41,11 @@ enable() {
|
||||||
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]}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enabled() {
|
||||||
|
name="$(basename "${initscript}")"
|
||||||
|
[ -x "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" ]
|
||||||
|
}
|
||||||
|
|
||||||
depends() {
|
depends() {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
@ -77,6 +82,7 @@ eval "case \"\$action\" in
|
||||||
boot) boot;;
|
boot) boot;;
|
||||||
shutdown) shutdown;;
|
shutdown) shutdown;;
|
||||||
enable) enable;;
|
enable) enable;;
|
||||||
|
enabled) enabled;;
|
||||||
disable) disable;;
|
disable) disable;;
|
||||||
$cmds
|
$cmds
|
||||||
*) help;;
|
*) help;;
|
||||||
|
|
Loading…
Reference in a new issue