mirror of
https://git.busybox.net/buildroot.git
synced 2024-12-18 17:53:34 +08:00
45 lines
532 B
Bash
Executable File
45 lines
532 B
Bash
Executable File
#! /bin/sh
|
|
|
|
[ -f /sbin/portmap ] || exit 0
|
|
|
|
start() {
|
|
echo -n "Starting portmap: "
|
|
portmap
|
|
mkdir -p /var/lock/subsys
|
|
touch /var/lock/subsys/portmap
|
|
echo "done"
|
|
}
|
|
|
|
|
|
stop() {
|
|
echo -n "Stopping portmap: "
|
|
echo
|
|
killall portmap
|
|
rm -rf /var/lock/subsys
|
|
echo "done"
|
|
}
|
|
|
|
restart() {
|
|
stop
|
|
start
|
|
rm -f /var/run/portmap.state
|
|
}
|
|
|
|
# See how we were called.
|
|
case "$1" in
|
|
start)
|
|
start
|
|
;;
|
|
stop)
|
|
stop
|
|
;;
|
|
restart|reload)
|
|
restart
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|reload|restart}"
|
|
exit 1
|
|
esac
|
|
|
|
exit $?
|