2 # Copyright (C) 2006-2009 OpenWrt.org
4 .
$IPKG_INSTROOT/etc
/functions.sh
37 name
="$(basename "${initscript}")"
38 rm -f "$IPKG_INSTROOT"/etc
/rc.d
/S??
$name
39 rm -f "$IPKG_INSTROOT"/etc
/rc.d
/K??
$name
43 name
="$(basename "${initscript}")"
45 [ "$START" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}"
46 [ "$STOP" ] && ln -s "../init.d/$name" "$IPKG_INSTROOT/etc/rc.d/K${STOP}${name##K[0-9][0-9]}"
50 name
="$(basename "${initscript}")"
51 [ -x "$IPKG_INSTROOT/etc/rc.d/S${START}${name##S[0-9][0-9]}" ]
60 Syntax: $initscript [command]
63 start Start the service
65 restart Restart the service
66 reload Reload configuration files (or restart if that fails)
67 enable Enable service autostart
68 disable Disable service autostart
75 ALL_COMMANDS
="start stop reload restart boot shutdown enable disable enabled depends ${EXTRA_COMMANDS}"
76 list_contains ALL_COMMANDS
"$action" || action
=help
77 [ "$action" = "reload" ] && action
='eval reload "$@" || restart "$@" && :'