2007-01-14 01:55:25 +01:00
|
|
|
#! /bin/sh
|
|
|
|
|
|
|
|
[ -f /sbin/portmap ] || exit 0
|
|
|
|
|
|
|
|
start() {
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Starting portmap: "
|
2007-01-14 01:55:25 +01:00
|
|
|
portmap
|
|
|
|
mkdir -p /var/lock/subsys
|
|
|
|
touch /var/lock/subsys/portmap
|
|
|
|
echo "done"
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
stop() {
|
2015-10-03 23:29:57 +02:00
|
|
|
printf "Stopping portmap: "
|
2007-01-14 01:55:25 +01:00
|
|
|
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 $?
|