update Thu Feb 11 00:37:00 PST 2010
[pkgsrc.git] / net / isc-dhcp / files / isc_dhcrelay.sh
1 #!@RCD_SCRIPTS_SHELL@
2 #
3 # $NetBSD: isc_dhcrelay.sh,v 1.3 2008/01/03 12:25:01 adrianp Exp $
4 #
5
6 # PROVIDE: dhcrelay
7 # REQUIRE: DAEMON
8 # BEFORE:  NETWORKING
9 #
10 #       Note that there no syslog logging of dhclient messages at boot because
11 #       dhclient needs to start before services that syslog depends upon do.
12 #
13
14 if [ -f /etc/rc.subr ]; then
15         . /etc/rc.subr
16 fi
17
18 name="dhcrelay"
19 rcvar="isc_${name}"
20 command="@PREFIX@/sbin/${name}"
21 pidfile="@VARBASE@/run/isc-dhcp/isc-${name}.pid"
22 start_precmd="isc_dhcrelay_precmd"
23
24 isc_dhcrelay_precmd()
25 {
26         if [ ! -d @VARBASE@/run/isc-dhcp ]; then
27                 @MKDIR@ @VARBASE@/run/isc-dhcp
28                 @CHMOD@ 0770 @VARBASE@/run/isc-dhcp
29         fi
30 }
31
32 load_rc_config $rcvar
33 run_rc_command "$1"