rpcbind revision 98184
157429Smarkm#!/bin/sh
257429Smarkm#
357429Smarkm# $NetBSD: rpcbind,v 1.6 2002/01/31 01:26:06 lukem Exp $
457429Smarkm# $FreeBSD: head/etc/rc.d/rpcbind 98184 2002-06-13 22:14:37Z gordon $
557429Smarkm#
657429Smarkm
760573Skris# PROVIDE: rpcbind
865668Skris# REQUIRE: NETWORKING ntpdate syslogd named ppp
965668Skris# KEYWORD: FreeBSD NetBSD
1065668Skris
1165668Skris. /etc/rc.subr
1265668Skris
1365668Skrisname="rpcbind"
1465668Skris
1560573Skris# XXX - Executable may be in a different location. The $name variable
1692555Sdes#	is different from the variable in rc.conf(5) so the
1760573Skris#	subroutines in rc.subr won't catch it.
1865668Skris#
1965668Skrisload_rc_config $name
2065668Skriscommand="${portmap_program:-/usr/sbin/${name}}"
2165668Skris
2265668Skriscase `${CMD_OSTYPE}` in
2365668SkrisFreeBSD)
2465668Skris	pidfile=
2565668Skris	rcvar="portmap_enable"
2665668Skris	command="${portmap_program:-/usr/sbin/${name}}"
2765668Skris	eval ${name}_flags=\"${portmap_flags}\"
2865668Skris	;;
2965668SkrisNetBSD)
3065668Skris	rcvar=$name
3165668Skris	command="/usr/sbin/${name}"
3265668Skris	pidfile="/var/run/${name}.pid"
3365668Skris	;;
3465668Skrisesac
3565668Skris
3665668Skrisrun_rc_command "$1"
3757429Smarkm