b77059fee2
isc-dhcp3-client/pkg-message updated isc-dhcp3-devel/pkg-plist updated from PR#61620 isc-dhcp3-relay/pkg-message rewritten to reflect rcNG change isc-dhcp3-relay/pkg-plist etc/rc.isc-dhcrelay.conf deleted etc/rc.d/isc-dhcrelay.sh.sample renamed to etc/rc.d/isc-dhcrelay.sh isc-dhcp3-server/Makefile PORTREVISION bumped USE_RC_SUBR added *_SUB added pre-everything added (WITHOUT_INTERFACE_POLLING cond added) patch-scripts and patch-pkgmessage (! -devel cond) updated patch-site-conf and patch-rc-scripts added install-startup-files now install etc/rc.d/isc-dhcpd.sh instead of etc/rc.d/isc-dhcpd.sh.sample display-message updated (! -devel cond) isc-dhcp3-server/pkg-message rewritten to reflect rcNG change isc-dhcp3-server/pkg-plist etc/rc.isc-dhcpd.conf deleted etc/rc.d/isc-dhcpd.sh.sample renamed to etc/rc.d/isc-dhcpd.sh isc-dhcp3-server/files/isc-dhcpd.sh.sample isc-dhcp3-server/files/isc-dhcrelay.sh.sample both converted to rcNG isc-dhcp3-server/files/patch-freebsd synced w/ -current isc-dhcp3-server/files/patch-site.conf CLIENT_PATH added CFLAGS synced w/ -current isc-dhcp3-server/patch-client::clparse.c isc-dhcp3-server/patch-client::dhclient.8 new files synced w/ -current isc-dhcp3-server/patch-client::dhclient.c new file synced w/ -current (-DENABLE_POLLING_MODE) isc-dhcp3-server/patch-client::dhclient.conf new file isc-dhcp3-server/patch-common::dhcp-options.5 new file synced w/ -current isc-dhcp3-server/patch-common::discover.c new file from PR#61011 isc-dhcp3-server/patch-common::dispatch.c new file synced w/ -current (-DENABLE_POLLING_MODE) isc-dhcp3-server/files/patch-common::parse.c fix time_t issues on little-endian 64-bit platforms isc-dhcp3-server/patch-dst::Makefile.dist new file from PR#61620 isc-dhcp3-server/patch-includes::cf::freebsd.h new file synced w/ -current (-DRESCUE unused right now) isc-dhcp3-server/patch-includes::dhcpd.h new file synced w/ -current (-DENABLE_POLLING_MODE) isc-dhcp3-server/files/rc.isc-dhcpd.conf.sample isc-dhcp3-server/files/rc.isc-dhcrelay.conf.sample deleted files PR: 57943, 61011, 61620 Submitted by: sec@42.org, andy@fud.org.nz, kaa@in-line.ru, des, ru
58 lines
1.1 KiB
Bash
58 lines
1.1 KiB
Bash
#! /bin/sh
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
# PROVIDE: dhcrelay
|
|
# REQUIRE: DAEMON
|
|
# KEYWORD: FreeBSD
|
|
#
|
|
# Add the following line to /etc/rc.conf to enable dhcrelay:
|
|
#
|
|
# dhcrelay_enable="YES"
|
|
#
|
|
|
|
# override these variables in /etc/rc.conf
|
|
dhcrelay_enable=NO
|
|
dhcrelay_flags= # command option(s)
|
|
dhcrelay_servers= # dhcrelay server(s)
|
|
dhcrelay_ifaces= # ethernet interface(s)
|
|
|
|
dhcrelay_precmd ()
|
|
{
|
|
local ifaces
|
|
|
|
dhcrelay_rcconf=%%PREFIX%%/etc/rc.isc-dhcrelay.conf
|
|
|
|
if [ -f ${dhcrelay_rcconf} ]; then
|
|
warn "${dhcrelay_rcconf} is obsolete, use /etc/rc.conf instead."
|
|
. ${dhcrelay_rcconf}
|
|
|
|
if [ -n "${dhcrelay_options}" -a -z "${rc_flags}" ]; then
|
|
warn "dhcrelay_options is obsolete, use dhcrelay_flags instead."
|
|
rc_flags=${dhcrelay_options}
|
|
fi
|
|
fi
|
|
|
|
if [ -z "${dhcrelay_servers}" ]; then
|
|
err 1 "no dhcrelay server(s) configured."
|
|
fi
|
|
|
|
ifaces=
|
|
for iface in ${dhcrelay_ifaces}; do
|
|
ifaces="${ifaces} -i ${iface}"
|
|
done
|
|
|
|
rc_flags="${rc_flags} ${ifaces} ${dhcrelay_servers}"
|
|
}
|
|
|
|
. %%RC_SUBR%%
|
|
|
|
name=dhcrelay
|
|
rcvar=$(set_rcvar)
|
|
|
|
command=%%PREFIX%%/sbin/${name}
|
|
pidfile=/var/run/${name}.pid
|
|
start_precmd=${name}_precmd
|
|
|
|
load_rc_config ${name}
|
|
run_rc_command "$1"
|