#! /bin/sh # # $FreeBSD: /tmp/pcvs/ports/net/dhcprelay/files/Attic/dhcprelay.sh.in,v 1.3 2006-03-21 02:48:21 edwin Exp $ # # PROVIDE: dhcprelay # REQUIRE: DAEMON # # Add the following line to /etc/rc.conf to enable dhcrelay: # # dhcprelay_enable="YES" # # override these variables in /etc/rc.conf dhcprelay_enable=${dhcprelay_enable:-"NO"} dhcprelay_server=${dhcprelay_server:-} # dhcprelay server(s) dhcprelay_ifaces=${dhcprelay_ifaces:-} # ethernet interface(s) dhcprelay_precmd () { rc_flags="${rc_flags} ${dhcprelay_ifaces} ${dhcprelay_server}" } . %%RC_SUBR%% name=dhcprelay rcvar=$(set_rcvar) pidfile=/var/run/${name}.pid command=/usr/local/bin/${name} start_precmd=${name}_precmd echo $rc_flags load_rc_config ${name} run_rc_command "$1"