aboutsummaryrefslogtreecommitdiff
path: root/net/isc-dhcp30-server/files
diff options
context:
space:
mode:
authorPeter Pentchev <roam@FreeBSD.org>2001-02-17 14:17:30 +0000
committerPeter Pentchev <roam@FreeBSD.org>2001-02-17 14:17:30 +0000
commitdbf330cfa86f9915da76a95ee95ea3f1701a7379 (patch)
treeb99e3d5b668f1d2659ba982f2bb4d21b88756306 /net/isc-dhcp30-server/files
parent7713ca376907b9c63f12420a1ee27b6f6d163192 (diff)
downloadports-dbf330cfa86f9915da76a95ee95ea3f1701a7379.tar.gz
ports-dbf330cfa86f9915da76a95ee95ea3f1701a7379.zip
Notes
Diffstat (limited to 'net/isc-dhcp30-server/files')
-rw-r--r--net/isc-dhcp30-server/files/isc-dhcpd.sh.sample7
-rw-r--r--net/isc-dhcp30-server/files/patch-aj63
-rw-r--r--net/isc-dhcp30-server/files/patch-clparse.c14
-rw-r--r--net/isc-dhcp30-server/files/patch-dhclient.856
-rw-r--r--net/isc-dhcp30-server/files/patch-dhclient.c52
-rw-r--r--net/isc-dhcp30-server/files/patch-freebsd76
-rw-r--r--net/isc-dhcp30-server/files/patch-site.conf21
-rw-r--r--net/isc-dhcp30-server/files/patch-site.h5
8 files changed, 212 insertions, 82 deletions
diff --git a/net/isc-dhcp30-server/files/isc-dhcpd.sh.sample b/net/isc-dhcp30-server/files/isc-dhcpd.sh.sample
index f07d745c3772..3cc86c5e65a3 100644
--- a/net/isc-dhcp30-server/files/isc-dhcpd.sh.sample
+++ b/net/isc-dhcp30-server/files/isc-dhcpd.sh.sample
@@ -2,6 +2,7 @@
# $FreeBSD$
+OPTIONS=""
IFACES="SET_THIS"
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
@@ -11,10 +12,10 @@ fi
case "$1" in
start)
- ${PREFIX}/sbin/dhcpd $IFACES
+ ${PREFIX}/sbin/dhcpd $OPTIONS $IFACES
;;
stop)
- kill `cat /var/run/dhcpd.pid`
+ killall dhcpd
;;
restart)
$0 stop
@@ -24,7 +25,7 @@ status)
ps -auxww | egrep '(conserver|console)' | egrep -v "($0|egrep)"
;;
*)
- echo "Usage: `basename $0` {start|stop|restart|status}" >&2
+ echo "usage: ${0##*/} {start|stop|restart|status}" >&2
;;
esac
diff --git a/net/isc-dhcp30-server/files/patch-aj b/net/isc-dhcp30-server/files/patch-aj
index 14f7db13ff15..b8a356216c52 100644
--- a/net/isc-dhcp30-server/files/patch-aj
+++ b/net/isc-dhcp30-server/files/patch-aj
@@ -1,43 +1,20 @@
---- includes/dhcpd.h.orig Wed Feb 2 18:01:17 2000
-+++ includes/dhcpd.h Mon Jul 17 21:21:04 2000
-@@ -329,7 +329,7 @@
- #endif
-
- #ifndef CL_DEFAULT_SCRIPT_NAME
--# define CL_DEFAULT_SCRIPT_NAME "/etc/dhclient-script"
-+# define CL_DEFAULT_SCRIPT_NAME "!!PREFIX!!/etc/dhclient-script"
- #endif
-
- #ifndef CL_DEFAULT_REQUESTED_OPTIONS
-@@ -771,11 +771,11 @@
- #define _PATH_DHCPD_DB "dhcpd.leases"
- #else
- #ifndef _PATH_DHCPD_CONF
--#define _PATH_DHCPD_CONF "/etc/dhcpd.conf"
-+#define _PATH_DHCPD_CONF "!!PREFIX!!/etc/dhcpd.conf"
- #endif
-
- #ifndef _PATH_DHCPD_DB
--#define _PATH_DHCPD_DB "/etc/dhcpd.leases"
-+#define _PATH_DHCPD_DB "!!PREFIX!!/etc/dhcpd.leases"
- #endif
-
- #ifndef _PATH_DHCPD_PID
-@@ -784,7 +784,7 @@
- #endif
-
- #ifndef _PATH_DHCLIENT_CONF
--#define _PATH_DHCLIENT_CONF "/etc/dhclient.conf"
-+#define _PATH_DHCLIENT_CONF "!!PREFIX!!/etc/dhclient.conf"
- #endif
-
- #ifndef _PATH_DHCLIENT_PID
-@@ -792,7 +792,7 @@
- #endif
-
- #ifndef _PATH_DHCLIENT_DB
--#define _PATH_DHCLIENT_DB "/etc/dhclient.leases"
-+#define _PATH_DHCLIENT_DB "!!PREFIX!!/etc/dhclient.leases"
- #endif
-
- #ifndef _PATH_RESOLV_CONF
+--- includes/dhcpd.h.orig Thu Jan 25 09:25:12 2001
++++ includes/dhcpd.h Fri Jan 26 06:46:12 2001
+@@ -672,7 +672,7 @@
+ u_int32_t requested_lease; /* Requested lease time, if user
+ doesn't configure one. */
+ struct string_list *media; /* Possible network media values. */
+- char *script_name; /* Name of config script. */
++ const char *script_name; /* Name of config script. */
+ char *vendor_space_name; /* Name of config script. */
+ enum policy bootp_policy;
+ /* Ignore, accept or prefer BOOTP
+@@ -1864,6 +1864,8 @@
+ void set_ip_address PROTO ((struct interface_info *, struct in_addr));
+
+ /* clparse.c */
++extern const char *client_script_name;
++
+ isc_result_t read_client_conf PROTO ((void));
+ void read_client_leases PROTO ((void));
+ void parse_client_statement PROTO ((struct parse *, struct interface_info *,
diff --git a/net/isc-dhcp30-server/files/patch-clparse.c b/net/isc-dhcp30-server/files/patch-clparse.c
index f2da52a15884..48c125d11094 100644
--- a/net/isc-dhcp30-server/files/patch-clparse.c
+++ b/net/isc-dhcp30-server/files/patch-clparse.c
@@ -1,5 +1,11 @@
---- client/clparse.c.orig Wed Jul 19 21:13:10 2000
-+++ client/clparse.c Thu Jul 20 21:52:53 2000
-@@ -46 +46 @@
+--- client/clparse.c.orig Thu Jan 25 09:17:17 2001
++++ client/clparse.c Fri Jan 26 06:11:01 2001
+@@ -50,7 +50,7 @@
+
+ static TIME parsed_time;
+
-char client_script_name [] = "/etc/dhclient-script";
-+char client_script_name [] = CL_DEFAULT_SCRIPT_NAME;
++const char *client_script_name = CL_DEFAULT_SCRIPT_NAME;
+
+ struct client_config top_level_config;
+
diff --git a/net/isc-dhcp30-server/files/patch-dhclient.8 b/net/isc-dhcp30-server/files/patch-dhclient.8
index 160c451e445b..2ba9899869c3 100644
--- a/net/isc-dhcp30-server/files/patch-dhclient.8
+++ b/net/isc-dhcp30-server/files/patch-dhclient.8
@@ -1,5 +1,5 @@
---- client/dhclient.8.orig Wed May 10 02:36:03 2000
-+++ client/dhclient.8 Wed May 10 02:39:43 2000
+--- client/dhclient.8.orig Mon May 1 19:11:36 2000
++++ client/dhclient.8 Fri Jan 26 05:12:37 2001
@@ -34,7 +34,7 @@
.B -q
]
@@ -9,15 +9,59 @@
]
[
.B -lf
-@@ -170,6 +170,11 @@
- .B -q
+@@ -49,6 +49,10 @@
+ .I config-file
+ ]
+ [
++.B -sf
++.I script-file
++]
++[
+ .B -s
+ server
+ ]
+@@ -174,17 +178,25 @@
flag prevents any messages other than errors from being printed to the
standard error descriptor.
-+.PP
+ .PP
+The
+.B -1
+flag cause dhclient to try once to get a lease. If it fails, dhclient exits
+with exit code two.
- .PP
++.PP
The DHCP client normally gets its configuration information from
.B ETCDIR/dhclient.conf,
+ its lease database from
+-.B DBDIR/dhclient.leases
+-and stores its process ID in a file called
++.B DBDIR/dhclient.leases,
++stores its process ID in a file called
+ .B RUNDIR/dhclient.pid.
++and configure the network interface using
++.B CLIENTBINDIR/dhclient-script.
+ To specify different names and/or locations for these files, use the
+ .B -cf,
+-.B -lf
+-and
++.B -lf,
+ .B -pf
++and
++.B -sf
+ flags, respectively, followed by the name of the file. This can be
+ particularly useful if, for example,
+ .B DBDIR
+@@ -206,10 +218,12 @@
+ .SH CONFIGURATION
+ The syntax of the dhclient.conf(8) file is discussed seperately.
+ .SH FILES
++.B CLIENTBINDIR/dhclient-script,
+ .B ETCDIR/dhclient.conf, DBDIR/dhclient.leases, RUNDIR/dhclient.pid,
+-.B DBDIR/dhclient.leases~.
++.B DBDIR/dhclient.leases.
+ .SH SEE ALSO
+-dhcpd(8), dhcrelay(8), dhclient.conf(5), dhclient.leases(5)
++dhcpd(8), dhcrelay(8), dhclient-script(8), dhclient.conf(5) and
++dhclient.leases(5).
+ .SH AUTHOR
+ .B dhclient(8)
+ has been written for the Internet Software Consortium
diff --git a/net/isc-dhcp30-server/files/patch-dhclient.c b/net/isc-dhcp30-server/files/patch-dhclient.c
index bb43074fbd36..ebbd815ecc5e 100644
--- a/net/isc-dhcp30-server/files/patch-dhclient.c
+++ b/net/isc-dhcp30-server/files/patch-dhclient.c
@@ -1,5 +1,5 @@
---- client/dhclient.c.orig Thu Sep 14 05:42:01 2000
-+++ client/dhclient.c Wed Sep 27 03:31:33 2000
+--- client/dhclient.c.orig Thu Jan 25 09:18:06 2001
++++ client/dhclient.c Fri Jan 26 06:15:50 2001
@@ -78,6 +78,7 @@
u_int16_t remote_port;
int no_daemon;
@@ -8,7 +8,27 @@
static void usage PROTO ((void));
-@@ -176,6 +177,8 @@
+@@ -104,6 +105,7 @@
+ int no_dhclient_conf = 0;
+ int no_dhclient_db = 0;
+ int no_dhclient_pid = 0;
++ int no_dhclient_script = 0;
+ char *s;
+
+ #ifdef SYSLOG_4_2
+@@ -159,6 +161,11 @@
+ usage ();
+ path_dhclient_db = argv [i];
+ no_dhclient_db = 1;
++ } else if (!strcmp (argv [i], "-sf")) {
++ if (++i == argc)
++ usage ();
++ client_script_name = argv [i];
++ no_dhclient_script = 1;
+ } else if (!strcmp (argv [i], "-q")) {
+ quiet = 1;
+ quiet_interface_discovery = 1;
+@@ -176,6 +183,8 @@
} else if (!strcmp (argv [i], "-w")) {
/* do not exit if there are no broadcast interfaces. */
persist = 1;
@@ -17,16 +37,32 @@
} else if (argv [i][0] == '-') {
usage ();
} else {
-@@ -417,7 +420,7 @@
+@@ -208,6 +217,9 @@
+ if (!no_dhclient_pid && (s = getenv ("PATH_DHCLIENT_PID"))) {
+ path_dhclient_pid = s;
+ }
++ if (!no_dhclient_script && (s = getenv ("PATH_DHCLIENT_SCRIPT"))) {
++ client_script_name = s;
++ }
+
+ /* first kill of any currently running client */
+ if (release_mode) {
+@@ -423,10 +435,11 @@
log_info (arr);
log_info (url);
- log_error ("Usage: dhclient [-d] [-D] [-q] [-p <port>] %s",
-+ log_error ("Usage: dhclient [-1] [-d] [-D] [-q] [-p <port>] %s",
++ log_error ("usage: dhclient [-1] [-d] [-D] [-q] [-p <port>] %s",
"[-s server]");
- log_fatal (" [-lf lease-file] [-pf pid-file]%s",
- "[-cf config-file] [interface]");
-@@ -1402,6 +1405,10 @@
+- log_fatal (" [-lf lease-file] [-pf pid-file]%s",
+- "[-cf config-file] [interface]");
++ log_error (" [-cf config-file] [-lf lease-file] %s",
++ "[-pf pid-file] [-sf script-file]");
++ log_fatal (" [interface]");
+ }
+
+ isc_result_t find_class (struct class **c,
+@@ -1432,6 +1445,10 @@
/* No leases were available, or what was available didn't work, so
tell the shell script that we failed to allocate an address,
and try again later. */
diff --git a/net/isc-dhcp30-server/files/patch-freebsd b/net/isc-dhcp30-server/files/patch-freebsd
index 293aa2a33130..2376cbb7ec40 100644
--- a/net/isc-dhcp30-server/files/patch-freebsd
+++ b/net/isc-dhcp30-server/files/patch-freebsd
@@ -1,5 +1,5 @@
---- client/scripts/freebsd.orig Wed Sep 20 02:38:03 2000
-+++ client/scripts/freebsd Wed Sep 27 03:33:29 2000
+--- client/scripts/freebsd.orig Wed Sep 20 11:38:03 2000
++++ client/scripts/freebsd Sat Jan 27 02:17:01 2001
@@ -1,5 +1,11 @@
#!/bin/sh
@@ -55,12 +55,26 @@
hostname $new_host_name
fi
fi
-@@ -105,11 +111,18 @@
+@@ -93,24 +99,31 @@
+ route delete default $router >/dev/null 2>&1
+ done
+ if [ "$old_static_routes" != "" ]; then
+- set $old_static_routes
++ set -- $old_static_routes
+ while [ $# -gt 1 ]; do
+ route delete $1 $2
+ shift; shift
+ done
+ fi
+- arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' |sh
++ arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -d \1/p' |sh
+ fi
+ if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
ifconfig $interface inet $new_ip_address $new_netmask_arg \
$new_broadcast_arg $medium
+ $LOGGER "New IP Address($interface): $new_ip_address"
-+ $LOGGER "New Subnet Mask ($interface): $new_subnet_mask"
++ $LOGGER "New Subnet Mask($interface): $new_subnet_mask"
+ $LOGGER "New Broadcast Address($interface): $new_broadcast_address"
+ if [ "$new_routers" != "" ]; then
+ $LOGGER "New Routers: $new_routers"
@@ -70,11 +84,29 @@
route add default $router >/dev/null 2>&1
done
if [ "$new_static_routes" != "" ]; then
+- set $new_static_routes
+ $LOGGER "New Static Routes: $new_static_routes"
- set $new_static_routes
++ set -- $new_static_routes
while [ $# -gt 1 ]; do
route add $1 $2
-@@ -161,8 +174,12 @@
+ shift; shift
+@@ -138,13 +151,13 @@
+ route delete default $router >/dev/null 2>&1
+ done
+ if [ "$old_static_routes" != "" ]; then
+- set $old_static_routes
++ set -- $old_static_routes
+ while [ $# -gt 1 ]; do
+ route delete $1 $2
+ shift; shift
+ done
+ fi
+- arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' \
++ arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -d \1/p' \
+ |sh >/dev/null 2>&1
+ fi
+ if [ x$alias_ip_address != x ]; then
+@@ -161,9 +174,13 @@
fi
ifconfig $interface inet $new_ip_address $new_netmask_arg \
$new_broadcast_arg $medium
@@ -83,7 +115,37 @@
+ $LOGGER "New Broadcast Address($interface): $new_broadcast_address"
sleep 1
if [ "$new_routers" != "" ]; then
+- set $new_routers
+ $LOGGER "New Routers: $new_routers"
- set $new_routers
++ set -- $new_routers
if ping -q -c 1 $1; then
if [ x$new_ip_address != x$alias_ip_address ] && \
+ [ x$alias_ip_address != x ]; then
+@@ -174,9 +191,9 @@
+ for router in $new_routers; do
+ route add default $router >/dev/null 2>&1
+ done
+- set $new_static_routes
++ set -- $new_static_routes
+ while [ $# -gt 1 ]; do
+- route add $0 $1
++ route add $1 $2
+ shift; shift
+ done
+ make_resolv_conf
+@@ -188,13 +205,13 @@
+ route delete default $router >/dev/null 2>&1
+ done
+ if [ "$old_static_routes" != "" ]; then
+- set $old_static_routes
++ set -- $old_static_routes
+ while [ $# -gt 1 ]; do
+ route delete $1 $2
+ shift; shift
+ done
+ fi
+- arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -n -d \1/p' \
++ arp -n -a | sed -n -e 's/^.*(\(.*\)) at .*$/arp -d \1/p' \
+ |sh >/dev/null 2>&1
+ exit_with_hooks 1
+ fi
diff --git a/net/isc-dhcp30-server/files/patch-site.conf b/net/isc-dhcp30-server/files/patch-site.conf
index afe3d066ff89..5efe4195aa73 100644
--- a/net/isc-dhcp30-server/files/patch-site.conf
+++ b/net/isc-dhcp30-server/files/patch-site.conf
@@ -1,23 +1,32 @@
---- site.conf.orig Wed Jul 7 08:20:10 1999
-+++ site.conf Tue Oct 3 08:59:57 2000
-@@ -1,2 +1,20 @@
+--- site.conf.orig Wed Jul 7 17:20:10 1999
++++ site.conf Fri Jan 26 06:58:15 2001
+@@ -1,2 +1,29 @@
# Put local site configuration stuff here to override the default
# settings in Makefile.conf
+
+PREFIX ?= /usr/local
+
-+ETC = $(PREFIX)/etc
+BINDIR = $(PREFIX)/sbin
+CLIENTBINDIR = $(PREFIX)/sbin
-+MANCAT = man
+ADMMANDIR = $(PREFIX)/man/man8
+ADMMANEXT = .8
+FFMANDIR = $(PREFIX)/man/man5
+FFMANEXT = .5
+LIBMANDIR = $(PREFIX)/man/man3
+LIBMANEXT = .3
++MANCAT = man
++# INSTALL = ${INSTALL_DATA}
++# MANINSTALL = ${INSTALL_MAN}
++ETC = $(PREFIX)/etc
++LIBDIR = ${PREFIX}/lib
++INCDIR = ${PREFIX}/include
+
+DEBUG ?= #none
-+CFLAGS += -DCL_DEFAULT_SCRIPT_NAME=\"$(ETC)/dhclient-script\"
++
++CFLAGS += -DCL_DEFAULT_SCRIPT_NAME=\"$(CLIENTBINDIR)/dhclient-script\"
++
+CFLAGS += -D_PATH_DHCPD_CONF=\"$(ETC)/dhcpd.conf\"
++CFLAGS += -D_PATH_DHCPD_DB=\"$(VARDB)/dhcpd.leases\"
++
+CFLAGS += -D_PATH_DHCLIENT_CONF=\"$(ETC)/dhclient.conf\"
++CFLAGS += -D_PATH_DHCLIENT_DB=\"$(VARDB)/dhclient.leases\"
diff --git a/net/isc-dhcp30-server/files/patch-site.h b/net/isc-dhcp30-server/files/patch-site.h
deleted file mode 100644
index c411dd071f23..000000000000
--- a/net/isc-dhcp30-server/files/patch-site.h
+++ /dev/null
@@ -1,5 +0,0 @@
---- includes/site.h.orig Thu Sep 28 11:24:17 2000
-+++ includes/site.h Sat Dec 2 00:46:53 2000
-@@ -159 +159 @@
--/* #define DHCPD_LOG_FACILITY LOG_DAEMON */
-+#define DHCPD_LOG_FACILITY LOG_!!USE_FACILITY!!