diff --git a/RELNOTES b/RELNOTES index f5a7a352..39b6b8bb 100644 --- a/RELNOTES +++ b/RELNOTES @@ -73,6 +73,8 @@ work on other platforms. Please report any problems and suggested fixes to - Merged IA_XX related structures. +- Add DHCPv6 files in configure. + Changes since 4.0.0 (new features) - Added DHCPv6 rapid commit support. diff --git a/configure b/configure index 96abcd57..87e2454e 100755 --- a/configure +++ b/configure @@ -1302,15 +1302,27 @@ Optional Packages: --with-srv-lease-file=PATH File for dhcpd leases (default is LOCALSTATEDIR/db/dhcpd.leases) + --with-srv6-lease-file=PATH + File for dhcpd6 leases (default is + LOCALSTATEDIR/db/dhcpd6.leases) --with-cli-lease-file=PATH File for dhclient leases (default is LOCALSTATEDIR/db/dhclient.leases) + --with-cli6-lease-file=PATH + File for dhclient6 leases (default is + LOCALSTATEDIR/db/dhclient6.leases) --with-srv-pid-file=PATH File for dhcpd process information (default is LOCALSTATEDIR/run/dhcpd.pid) + --with-srv6-pid-file=PATH + File for dhcpd6 process information (default is + LOCALSTATEDIR/run/dhcpd6.pid) --with-cli-pid-file=PATH File for dhclient process information (default is LOCALSTATEDIR/run/dhclient.pid) + --with-cli6-pid-file=PATH + File for dhclient6 process information (default is + LOCALSTATEDIR/run/dhclient6.pid) --with-relay-pid-file=PATH File for dhcrelay process information (default is LOCALSTATEDIR/run/dhcrelay.pid) @@ -4600,6 +4612,41 @@ fi echo "$with_srv_lease_file" +# Check whether --with-srv6-lease-file was given. +if test "${with_srv6_lease_file+set}" = set; then + withval=$with_srv6_lease_file; +cat >>confdefs.h <<_ACEOF +#define _PATH_DHCPD6_DB "$withval" +_ACEOF + +fi + + +echo -n "checking for dhcpd6.leases location..." +if [ "x$with_srv6_lease_file" = "x" ] ; then + if [ -d "${localstatedir}/db" ] ; then + with_srv6_lease_file="${localstatedir}/db/dhcpd6.leases" + elif [ -d "${localstatedir}/state" ] ; then + if [ -d "${localstatedir}/state/dhcp" ] ; then + with_srv6_lease_file="${localstatedir}/state/dhcp/dhcpd6.leases" + else + with_srv6_lease_file="${localstatedir}/state/dhcpd6.leases" + fi + elif [ -d "${localstatedir}/lib" ] ; then + if [ -d "${localstatedir}/lib/dhcp" ] ; then + with_srv6_lease_file="${localstatedir}/lib/dhcp/dhcpd6.leases" + else + with_srv6_lease_file="${localstatedir}/lib/dhcpd6.leases" + fi + elif [ -d "${localstatedir}/etc" ] ; then + with_srv6_lease_file="${localstatedir}/etc/dhcpd6.leases" + else + with_srv6_lease_file="/etc/dhcpd6.leases" + fi +fi +echo "$with_srv6_lease_file" + + # Check whether --with-cli-lease-file was given. if test "${with_cli_lease_file+set}" = set; then withval=$with_cli_lease_file; @@ -4635,6 +4682,41 @@ fi echo "$with_cli_lease_file" +# Check whether --with-cli6-lease-file was given. +if test "${with_cli6_lease_file+set}" = set; then + withval=$with_cli6_lease_file; +cat >>confdefs.h <<_ACEOF +#define _PATH_DHCLIENT6_DB "$withval" +_ACEOF + +fi + + +echo -n "checking for dhclient6.leases location..." +if [ "x$with_cli6_lease_file" = "x" ] ; then + if [ -d "${localstatedir}/db" ] ; then + with_cli6_lease_file="${localstatedir}/db/dhclient6.leases" + elif [ -d "${localstatedir}/state" ] ; then + if [ -d "${localstatedir}/state/dhcp" ] ; then + with_cli6_lease_file="${localstatedir}/state/dhcp/dhclient6.leases" + else + with_cli6_lease_file="${localstatedir}/state/dhclient6.leases" + fi + elif [ -d "${localstatedir}/lib" ] ; then + if [ -d "${localstatedir}/lib/dhcp" ] ; then + with_cli6_lease_file="${localstatedir}/lib/dhcp/dhclient6.leases" + else + with_cli6_lease_file="${localstatedir}/lib/dhclient6.leases" + fi + elif [ -d "${localstatedir}/etc" ] ; then + with_cli6_lease_file="${localstatedir}/etc/dhclient6.leases" + else + with_cli6_lease_file="/etc/dhclient6.leases" + fi +fi +echo "$with_cli6_lease_file" + + # Check whether --with-srv-pid-file was given. if test "${with_srv_pid_file+set}" = set; then withval=$with_srv_pid_file; @@ -4645,11 +4727,31 @@ _ACEOF fi +# Check whether --with-srv6-pid-file was given. +if test "${with_srv6_pid_file+set}" = set; then + withval=$with_srv6_pid_file; +cat >>confdefs.h <<_ACEOF +#define _PATH_DHCPD6_PID "$withval" +_ACEOF + +fi + + # Check whether --with-cli-pid-file was given. if test "${with_cli_pid_file+set}" = set; then withval=$with_cli_pid_file; cat >>confdefs.h <<_ACEOF -#define _PATH_DHCLIENT "$withval" +#define _PATH_DHCLIENT_PID "$withval" +_ACEOF + +fi + + +# Check whether --with-cli6-pid-file was given. +if test "${with_cli6_pid_file+set}" = set; then + withval=$with_cli6_pid_file; +cat >>confdefs.h <<_ACEOF +#define _PATH_DHCLIENT6_PID "$withval" _ACEOF fi diff --git a/configure.ac b/configure.ac index 24a76785..9118f897 100644 --- a/configure.ac +++ b/configure.ac @@ -175,6 +175,37 @@ if [[ "x$with_srv_lease_file" = "x" ]] ; then fi echo "$with_srv_lease_file" +AC_ARG_WITH(srv6-lease-file, + AC_HELP_STRING([--with-srv6-lease-file=PATH], + [File for dhcpd6 leases + (default is LOCALSTATEDIR/db/dhcpd6.leases)]), + AC_DEFINE_UNQUOTED([_PATH_DHCPD6_DB], ["$withval"], + [File for dhcpd6 leases.])) + +echo -n "checking for dhcpd6.leases location..." +if [[ "x$with_srv6_lease_file" = "x" ]] ; then + if [[ -d "${localstatedir}/db" ]] ; then + with_srv6_lease_file="${localstatedir}/db/dhcpd6.leases" + elif [[ -d "${localstatedir}/state" ]] ; then + if [[ -d "${localstatedir}/state/dhcp" ]] ; then + with_srv6_lease_file="${localstatedir}/state/dhcp/dhcpd6.leases" + else + with_srv6_lease_file="${localstatedir}/state/dhcpd6.leases" + fi + elif [[ -d "${localstatedir}/lib" ]] ; then + if [[ -d "${localstatedir}/lib/dhcp" ]] ; then + with_srv6_lease_file="${localstatedir}/lib/dhcp/dhcpd6.leases" + else + with_srv6_lease_file="${localstatedir}/lib/dhcpd6.leases" + fi + elif [[ -d "${localstatedir}/etc" ]] ; then + with_srv6_lease_file="${localstatedir}/etc/dhcpd6.leases" + else + with_srv6_lease_file="/etc/dhcpd6.leases" + fi +fi +echo "$with_srv6_lease_file" + AC_ARG_WITH(cli-lease-file, AC_HELP_STRING([--with-cli-lease-file=PATH], [File for dhclient leases @@ -206,18 +237,61 @@ if [[ "x$with_cli_lease_file" = "x" ]] ; then fi echo "$with_cli_lease_file" +AC_ARG_WITH(cli6-lease-file, + AC_HELP_STRING([--with-cli6-lease-file=PATH], + [File for dhclient6 leases + (default is LOCALSTATEDIR/db/dhclient6.leases)]), + AC_DEFINE_UNQUOTED([_PATH_DHCLIENT6_DB], ["$withval"], + [File for dhclient6 leases.])) + +echo -n "checking for dhclient6.leases location..." +if [[ "x$with_cli6_lease_file" = "x" ]] ; then + if [[ -d "${localstatedir}/db" ]] ; then + with_cli6_lease_file="${localstatedir}/db/dhclient6.leases" + elif [[ -d "${localstatedir}/state" ]] ; then + if [[ -d "${localstatedir}/state/dhcp" ]] ; then + with_cli6_lease_file="${localstatedir}/state/dhcp/dhclient6.leases" + else + with_cli6_lease_file="${localstatedir}/state/dhclient6.leases" + fi + elif [[ -d "${localstatedir}/lib" ]] ; then + if [[ -d "${localstatedir}/lib/dhcp" ]] ; then + with_cli6_lease_file="${localstatedir}/lib/dhcp/dhclient6.leases" + else + with_cli6_lease_file="${localstatedir}/lib/dhclient6.leases" + fi + elif [[ -d "${localstatedir}/etc" ]] ; then + with_cli6_lease_file="${localstatedir}/etc/dhclient6.leases" + else + with_cli6_lease_file="/etc/dhclient6.leases" + fi +fi +echo "$with_cli6_lease_file" + AC_ARG_WITH(srv-pid-file, AC_HELP_STRING([--with-srv-pid-file=PATH], [File for dhcpd process information (default is LOCALSTATEDIR/run/dhcpd.pid)]), AC_DEFINE_UNQUOTED([_PATH_DHCPD_PID], ["$withval"], [File for dhcpd process information.])) +AC_ARG_WITH(srv6-pid-file, + AC_HELP_STRING([--with-srv6-pid-file=PATH], + [File for dhcpd6 process information + (default is LOCALSTATEDIR/run/dhcpd6.pid)]), + AC_DEFINE_UNQUOTED([_PATH_DHCPD6_PID], ["$withval"], + [File for dhcpd6 process information.])) AC_ARG_WITH(cli-pid-file, AC_HELP_STRING([--with-cli-pid-file=PATH], [File for dhclient process information (default is LOCALSTATEDIR/run/dhclient.pid)]), - AC_DEFINE_UNQUOTED([_PATH_DHCLIENT], ["$withval"], + AC_DEFINE_UNQUOTED([_PATH_DHCLIENT_PID], ["$withval"], [File for dhclient process information.])) +AC_ARG_WITH(cli6-pid-file, + AC_HELP_STRING([--with-cli6-pid-file=PATH], + [File for dhclient6 process information + (default is LOCALSTATEDIR/run/dhclient6.pid)]), + AC_DEFINE_UNQUOTED([_PATH_DHCLIENT6_PID], ["$withval"], + [File for dhclient6 process information.])) AC_ARG_WITH(relay-pid-file, AC_HELP_STRING([--with-relay-pid-file=PATH], [File for dhcrelay process information diff --git a/includes/config.h.in b/includes/config.h.in index aaae5e1d..2fe3719a 100644 --- a/includes/config.h.in +++ b/includes/config.h.in @@ -124,12 +124,24 @@ /* Version number of package */ #undef VERSION -/* File for dhclient process information. */ -#undef _PATH_DHCLIENT +/* File for dhclient6 leases. */ +#undef _PATH_DHCLIENT6_DB + +/* File for dhclient6 process information. */ +#undef _PATH_DHCLIENT6_PID /* File for dhclient leases. */ #undef _PATH_DHCLIENT_DB +/* File for dhclient process information. */ +#undef _PATH_DHCLIENT_PID + +/* File for dhcpd6 leases. */ +#undef _PATH_DHCPD6_DB + +/* File for dhcpd6 process information. */ +#undef _PATH_DHCPD6_PID + /* File for dhcpd leases. */ #undef _PATH_DHCPD_DB