blob: 12a7dc9129b535594dc274a9bb030cda68e85a09 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/bin/sh
. /etc/rc.subr
start() {
if checkyesno ${portmap_enable}; then
if [ ! -x ${portmap_program} ]; then
log_error "Missing 'portmap' program (${portmap_program})"
echo "Failed"
return 1
fi
echo -n " * Starting portmap: "
if ${portmap_program} ${portmap_flags}; then
mkdir -p /var/lock/subsys
touch /var/lock/subsys/portmap
echo "Ok"
else
echo "Failed"
fi
fi
}
stop() {
echo -n " * Stopping portmap: "
killall portmap
rm -rf /var/lock/subsys > /dev/null 2>&1
echo "Ok"
}
rc_run_command "$1"
|