2005-11-15 12:26:44 +01:00
|
|
|
#! /bin/sh
|
|
|
|
#
|
2009-07-17 20:39:07 +02:00
|
|
|
# $FreeBSD$
|
2005-11-15 12:26:44 +01:00
|
|
|
#
|
|
|
|
# PROVIDE: dhcprelay
|
|
|
|
# REQUIRE: DAEMON
|
|
|
|
#
|
|
|
|
# Add the following line to /etc/rc.conf to enable dhcrelay:
|
|
|
|
#
|
|
|
|
# dhcprelay_enable="YES"
|
|
|
|
#
|
2011-05-15 04:49:17 +02:00
|
|
|
# dhcprelay_server dhcprelay server(s)
|
|
|
|
# dhcprelay_ifaces ethernet interface(s)
|
2005-11-15 12:26:44 +01:00
|
|
|
|
2010-03-27 01:15:24 +01:00
|
|
|
. /etc/rc.subr
|
2005-11-15 12:26:44 +01:00
|
|
|
|
|
|
|
name=dhcprelay
|
2012-01-14 09:57:23 +01:00
|
|
|
rcvar=dhcprelay_enable
|
2005-11-15 12:26:44 +01:00
|
|
|
|
2009-07-20 20:49:57 +02:00
|
|
|
pidfile=/var/run/${name}.pid
|
|
|
|
command=%%PREFIX%%/bin/${name}
|
|
|
|
command_args="${dhcprelay_ifaces} ${dhcprelay_server}"
|
2005-11-15 12:26:44 +01:00
|
|
|
|
2009-07-20 20:49:57 +02:00
|
|
|
# echo $rc_flags
|
2005-11-15 12:26:44 +01:00
|
|
|
|
|
|
|
load_rc_config ${name}
|
2009-07-20 20:49:57 +02:00
|
|
|
|
|
|
|
dhcprelay_enable=${dhcprelay_enable:"NO"}
|
|
|
|
|
2005-11-15 12:26:44 +01:00
|
|
|
run_rc_command "$1"
|