M7350/oe-core/meta/recipes-bsp/apmd/apmd-3.2.2-14/init

45 lines
891 B
Plaintext
Raw Normal View History

2024-09-09 08:52:07 +00:00
#!/bin/sh
### BEGIN INIT INFO
# Provides: apmd
# Required-Start: $remote_fs
# Required-Stop: $remote_fs
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Advanced Power Management daemon
### END INIT INFO
PATH=/bin:/usr/bin:/sbin:/usr/sbin
[ -f /etc/default/rcS ] && . /etc/default/rcS
[ -f /etc/default/apmd ] && . /etc/default/apmd
case "$1" in
start)
echo -n "Starting advanced power management daemon: "
start-stop-daemon -S -x /usr/sbin/apmd -- \
-P /etc/apm/apmd_proxy $APMD
if [ $? = 0 ]; then
echo "apmd."
else
echo "(failed.)"
fi
;;
stop)
echo -n "Stopping advanced power management daemon: "
start-stop-daemon -K \
-x /usr/sbin/apmd
echo "apmd."
;;
restart|force-reload)
$0 stop
$0 start
exit
;;
*)
echo "Usage: /etc/init.d/apmd {start|stop|restart|force-reload}"
exit 1
;;
esac
exit 0