#!/bin/sh

. /etc/control.d/functions

CONFIG=/etc/sysconfig/portmap

new_subst server \
	'^#PORTMAP_ARGS="-l"$' \
	's/^PORTMAP_ARGS="-l"$/#PORTMAP_ARGS="-l"/'

new_subst local \
	'^PORTMAP_ARGS="-l"$' \
	's/^#PORTMAP_ARGS="-l"$/PORTMAP_ARGS="-l"/'

new_help server 'Listen to the network'
new_help local 'Listen to localhost only'

new_summary 'RPC portmap listener'

control_subst "$CONFIG" "$*"
