From: Roy Marples Date: Thu, 17 Apr 2008 21:18:20 +0000 (+0000) Subject: Move the duid file to /etc/dhcpcd as it's really a config file. Also, rename hook... X-Git-Tag: v4.0.2~473 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7eb93bd9e42aa2d63c28e006f74ee19d0a13a31d;p=thirdparty%2Fdhcpcd.git Move the duid file to /etc/dhcpcd as it's really a config file. Also, rename hook dirs to dhcpcd- so they could be installed into /etc and not just /etc/dhcpcd. --- diff --git a/config.h b/config.h index f8bb018c..bda7efb8 100644 --- a/config.h +++ b/config.h @@ -49,21 +49,20 @@ #define PACKAGE "dhcpcd" -#define RESOLVFILE "/etc/resolv.conf" #ifndef SYSCONFDIR -# define SYSCONFDIR "/etc" +# define SYSCONFDIR "/etc/" PACKAGE #endif -#define DEFAULTSCRIPT SYSCONFDIR "/" PACKAGE ".sh" - #ifndef RUNDIR # define RUNDIR "/var/run" #endif -#define PIDFILE RUNDIR "/" PACKAGE "-%s.pid" - #ifndef DBDIR # define DBDIR "/var/db" #endif + +#define RESOLVFILE "/etc/resolv.conf" +#define DEFAULTSCRIPT SYSCONFDIR "/" PACKAGE ".sh" +#define DUIDFILE SYSCONFDIR "/" PACKAGE ".duid" #define LEASEFILE DBDIR "/" PACKAGE "-%s.lease" -#define DUIDFILE DBDIR "/" PACKAGE ".duid" +#define PIDFILE RUNDIR "/" PACKAGE "-%s.pid" #endif diff --git a/dhcpcd.8.in b/dhcpcd.8.in index f8928b0b..12f0b83a 100644 --- a/dhcpcd.8.in +++ b/dhcpcd.8.in @@ -327,7 +327,7 @@ Linux Socket Filter, or LPF device on Linux based systems. .Bl -ohang .It Pa @SYSCONFDIR@/dhcpcd.sh Bourne shell script that is run when we configure or deconfigure an interface. -.It Pa @DBDIR@/dhcpcd.duid +.It Pa @SYSCONFDIR@/dhcpcd.duid Text file that holds the DUID used to identify the host. .It Pa @DBDIR@/dhcpcd- Ns Ar interface Ns .lease The actual DHCP message send by the server. We use this when reading the last diff --git a/dhcpcd.sh.in b/dhcpcd.sh.in index a2763e9d..fd168554 100644 --- a/dhcpcd.sh.in +++ b/dhcpcd.sh.in @@ -27,7 +27,7 @@ do_hooks() { local x= r=0 - for x in @SYSCONFDIR@/"$1"-hook.d/* @SYSCONFDIR@/"$1"-hook; do + for x in @SYSCONFDIR@/dhcpcd-"$1"-hook.d/* @SYSCONFDIR@/dhcpcd-"$1"-hook; do if [ -e "${x}" ]; then . "${x}" r=$((${r} + $?))