kumquat-buildroot/target/device/valka/target_skeleton/etc/rc.d/portmap
2008-03-06 18:59:14 +00:00

32 lines
540 B
Bash
Executable File

#!/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"