aboutsummaryrefslogtreecommitdiffstats
path: root/net/dhcp6/files
diff options
context:
space:
mode:
authorsuz <suz@FreeBSD.org>2006-06-24 13:57:26 +0800
committersuz <suz@FreeBSD.org>2006-06-24 13:57:26 +0800
commit464e42cec13a783987d8e010d560f74ab9578dd1 (patch)
tree798074d22be392fb8c29532d083dfc4d40b1664a /net/dhcp6/files
parent9ebc2165b30f239395add27a1d78f7df6b480636 (diff)
downloadfreebsd-ports-gnome-464e42cec13a783987d8e010d560f74ab9578dd1.tar.gz
freebsd-ports-gnome-464e42cec13a783987d8e010d560f74ab9578dd1.tar.zst
freebsd-ports-gnome-464e42cec13a783987d8e010d560f74ab9578dd1.zip
- updated to the last package
- make it port-lint compliant - fixed a compilation failure in freebsd4 PR: ports/98741
Diffstat (limited to 'net/dhcp6/files')
-rw-r--r--net/dhcp6/files/dhcp6c.sh36
-rw-r--r--net/dhcp6/files/dhcp6c.sh.in53
-rw-r--r--net/dhcp6/files/dhcp6relay.sh35
-rw-r--r--net/dhcp6/files/dhcp6relay.sh.in46
-rw-r--r--net/dhcp6/files/dhcp6s.sh36
-rw-r--r--net/dhcp6/files/dhcp6s.sh.in49
-rw-r--r--net/dhcp6/files/patch-lease.c28
7 files changed, 176 insertions, 107 deletions
diff --git a/net/dhcp6/files/dhcp6c.sh b/net/dhcp6/files/dhcp6c.sh
deleted file mode 100644
index 95ecedc1be37..000000000000
--- a/net/dhcp6/files/dhcp6c.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-# PROVIDE: dhcp6c
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-# KEYWORD: shutdown
-#
-# NOTE for FreeBSD 5.0+:
-# If you want this script to start with the base rc scripts
-# move dhcp6c.sh to /etc/rc.d/dhcp6c
-
-prefix=%%PREFIX%%
-
-# Define these dhcp6c_* variables in one of these files:
-# /etc/rc.conf
-# /etc/rc.conf.local
-# /etc/rc.conf.d/dhcp6c
-#
-# DO NOT CHANGE THESE DEFAULT VALUES HERE
-#
-dhcp6c_enable=${dhcp6c_enable:-"NO"} # Enable dhcp6c
-#dhcp6c_program="${prefix}/sbin/${name}" # Location of dhcp6c
-#dhcp6c_flags="fxp0" # Flags to dhcp6c program
-
-. %%RC_SUBR%%
-
-name="dhcp6c"
-rcvar=`set_rcvar`
-command="${prefix}/sbin/${name}"
-required_files="${prefix}/etc/${name}.conf"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/net/dhcp6/files/dhcp6c.sh.in b/net/dhcp6/files/dhcp6c.sh.in
new file mode 100644
index 000000000000..a37fc52c3363
--- /dev/null
+++ b/net/dhcp6/files/dhcp6c.sh.in
@@ -0,0 +1,53 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: dhcp6c
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: shutdown
+
+# Add the following lines to
+# /etc/rc.conf.d/dhcp6c /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# dhcp6c_enable (bool): Set to NO by default.
+# Set it to YES to enable dhcp6c.
+# dhcp6c_config (path): Set to %%PREFIX%%/etc/dhcp6c.conf
+# by default.
+# dhcp6c_pidfile (path): Set to /var/run/dhcp6c.pid
+# by default.
+# dhcp6c_interfaces (NIC list): Not defined by default.
+# Set it to the network interface(s) where dhcp6c should work on.
+# dhcp6c_flags (additional arguments): Not defined by default.
+#
+
+. %%RC_SUBR%%
+
+name="dhcp6c"
+rcvar=${name}_enable
+
+prefix="%%PREFIX%%"
+command="${prefix}/sbin/${name}"
+start_precmd="${name}_precmd"
+
+load_rc_config $name
+
+: ${dhcp6c_enable="NO"}
+: ${dhcp6c_config="${prefix}/etc/${name}.conf"}
+: ${dhcp6c_pidfile="/var/run/${name}.pid"}
+
+required_files="${dhcp6c_config}"
+pidfile="${dhcp6c_pidfile}"
+command_args="-c ${dhcp6c_config} -p ${dhcp6c_pidfile} ${dhcp6c_flags} ${dhcp6c_interfaces}"
+
+dhcp6c_precmd()
+{
+ if [ -z ${dhcp6c_interfaces} ]; then
+ warn "dhcp6c_interfaces is not set."
+ return 1
+ fi
+}
+
+run_rc_command "$1"
diff --git a/net/dhcp6/files/dhcp6relay.sh b/net/dhcp6/files/dhcp6relay.sh
deleted file mode 100644
index cece41dbf6b9..000000000000
--- a/net/dhcp6/files/dhcp6relay.sh
+++ /dev/null
@@ -1,35 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-# PROVIDE: dhcp6relay
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-# KEYWORD: shutdown
-#
-# NOTE for FreeBSD 5.0+:
-# If you want this script to start with the base rc scripts
-# move dhcp6relay.sh to /etc/rc.d/dhcp6relay
-
-prefix=%%PREFIX%%
-
-# Define these dhcp6relay_* variables in one of these files:
-# /etc/rc.conf
-# /etc/rc.conf.local
-# /etc/rc.conf.d/dhcp6relay
-#
-# DO NOT CHANGE THESE DEFAULT VALUES HERE
-#
-dhcp6relay_enable=${dhcp6relay_enable:-"NO"} # Enable dhcp6relay
-#dhcp6relay_program="${prefix}/sbin/${name}" # Location of dhcp6relay
-#dhcp6relay_flags="-r fxp1 fxp0" # Flags to dhcp6relay program
-
-. %%RC_SUBR%%
-
-name="dhcp6relay"
-rcvar=`set_rcvar`
-command="${prefix}/sbin/${name}"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/net/dhcp6/files/dhcp6relay.sh.in b/net/dhcp6/files/dhcp6relay.sh.in
new file mode 100644
index 000000000000..2b7e79da8457
--- /dev/null
+++ b/net/dhcp6/files/dhcp6relay.sh.in
@@ -0,0 +1,46 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: dhcp6relay
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: shutdown
+
+# Add the following lines to
+# /etc/rc.conf.d/dhcp6relay /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# dhcp6relay_enable (bool): Set to NO by default.
+# Set it to YES to enable dhcp6relay.
+# dhcp6relay_interfaces (NIC list): Not defined by default.
+# Set it to the network interface(s) where dhcp6relay should work
+# on.
+# dhcp6relay_flags (additional arguments): Not defined by default.
+#
+
+. %%RC_SUBR%%
+
+name="dhcp6relay"
+rcvar=${name}_enable
+
+prefix=%%PREFIX%%
+command=${prefix}/sbin/${name}
+start_precmd="${name}_precmd"
+
+load_rc_config $name
+
+: ${dhcp6relay_enable="NO"}
+
+command_args="${dhcp6relay_flags} ${dhcp6relay_interfaces}"
+
+dhcp6relay_precmd()
+{
+ if [ -z ${dhcp6relay_interfaces} ]; then
+ warn "dhcp6relay_interfaces is not set."
+ return 1
+ fi
+}
+
+run_rc_command "$1"
diff --git a/net/dhcp6/files/dhcp6s.sh b/net/dhcp6/files/dhcp6s.sh
deleted file mode 100644
index a9428b1c72f5..000000000000
--- a/net/dhcp6/files/dhcp6s.sh
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD$
-#
-
-# PROVIDE: dhcp6s
-# REQUIRE: DAEMON
-# BEFORE: LOGIN
-# KEYWORD: shutdown
-#
-# NOTE for FreeBSD 5.0+:
-# If you want this script to start with the base rc scripts
-# move dhcp6s.sh to /etc/rc.d/dhcp6s
-
-prefix=%%PREFIX%%
-
-# Define these dhcp6s_* variables in one of these files:
-# /etc/rc.conf
-# /etc/rc.conf.local
-# /etc/rc.conf.d/dhcp6s
-#
-# DO NOT CHANGE THESE DEFAULT VALUES HERE
-#
-dhcp6s_enable=${dhcp6s_enable:-"NO"} # Enable dhcp6s
-#dhcp6s_program="${prefix}/sbin/${name}" # Location of dhcp6s
-#dhcp6s_flags="fxp0" # Flags to dhcp6s program
-
-. %%RC_SUBR%%
-
-name="dhcp6s"
-rcvar=`set_rcvar`
-command="${prefix}/sbin/${name}"
-required_files="${prefix}/etc/${name}.conf"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/net/dhcp6/files/dhcp6s.sh.in b/net/dhcp6/files/dhcp6s.sh.in
new file mode 100644
index 000000000000..f31a405d8651
--- /dev/null
+++ b/net/dhcp6/files/dhcp6s.sh.in
@@ -0,0 +1,49 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: dhcp6s
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: shutdown
+
+# Add the following lines to
+# /etc/rc.conf.d/dhcp6s /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# dhcp6s_enable (bool): Set to NO by default.
+# Set it to YES to enable dhcp6s.
+# dhcp6s_config (path): Set to %%PREFIX%%/etc/dhcp6s.conf
+# by default.
+# dhcp6s_interface (NIC): Not defined by default.
+# Set it to the network interface where dhcp6s should work on.
+# dhcp6s_flags (additional arguments): Not defined by default.
+#
+
+. %%RC_SUBR%%
+
+name="dhcp6s"
+rcvar=${name}_enable
+
+prefix=%%PREFIX%%
+command=${prefix}/sbin/${name}
+start_precmd="${name}_precmd"
+
+load_rc_config $name
+
+: ${dhcp6s_enable="NO"}
+: ${dhcp6s_config="${prefix}/etc/${name}.conf"}
+
+required_files=${dhcp6s_config}
+command_args="-c ${dhcp6s_config} ${dhcp6s_flags} ${dhcp6s_interface}"
+
+dhcp6s_precmd()
+{
+ if [ -z ${dhcp6s_interface} ]; then
+ warn "dhcp6s_interface is not set."
+ return 1
+ fi
+}
+
+run_rc_command "$1"
diff --git a/net/dhcp6/files/patch-lease.c b/net/dhcp6/files/patch-lease.c
new file mode 100644
index 000000000000..3baad14ee375
--- /dev/null
+++ b/net/dhcp6/files/patch-lease.c
@@ -0,0 +1,28 @@
+--- lease.c.orig Thu Jan 26 07:48:28 2006
++++ lease.c Thu Jun 8 22:05:22 2006
+@@ -33,6 +33,16 @@
+ #include <string.h>
+ #include <sys/socket.h>
+ #include <sys/queue.h>
++#if TIME_WITH_SYS_TIME
++# include <sys/time.h>
++# include <time.h>
++#else
++# if HAVE_SYS_TIME_H
++# include <sys/time.h>
++# else
++# include <time.h>
++# endif
++#endif
+ #include <netinet/in.h>
+ #include "dhcp6.h"
+ #include "config.h"
+@@ -45,7 +55,7 @@
+
+ struct hash_entry {
+ LIST_ENTRY(hash_entry) list;
+- char val[];
++ char *val;
+ };
+
+ LIST_HEAD(hash_head, hash_entry);