--- Misc/Portable.h.orig 2020-07-23 16:41:34.000000000 -0500 +++ Misc/Portable.h 2021-08-17 16:57:02.000000000 -0500 @@ -161,40 +161,40 @@ #ifndef DEFAULT_WORKDIR #if defined(BSD) -#define DEFAULT_WORKDIR "/var/db/dibbler" +#define DEFAULT_WORKDIR "__PREFIX__/var/db/dibbler" #else #if !defined(WIN32) -#define DEFAULT_WORKDIR "/var/lib/dibbler" +#define DEFAULT_WORKDIR "__PREFIX__/var/lib/dibbler" #endif #endif #endif #if defined(LINUX) || defined(BSD) || defined(SUNOS) -#define DEFAULT_CLNTCONF_FILE "/etc/dibbler/client.conf" -#define DEFAULT_CLNTPID_FILE "/var/lib/dibbler/client.pid" -#define DEFAULT_CLNTLOG_FILE "/var/log/dibbler/dibbler-client.log" +#define DEFAULT_CLNTCONF_FILE "__PREFIX__/etc/dibbler/client.conf" +#define DEFAULT_CLNTPID_FILE "__PREFIX__/var/lib/dibbler/client.pid" +#define DEFAULT_CLNTLOG_FILE "__PREFIX__/var/log/dibbler/dibbler-client.log" #define DEFAULT_SCRIPT "" -#define SRVCONF_FILE "/etc/dibbler/server.conf" -#define RELCONF_FILE "/etc/dibbler/relay.conf" +#define SRVCONF_FILE "__PREFIX__/etc/dibbler/server.conf" +#define RELCONF_FILE "__PREFIX__/etc/dibbler/relay.conf" #define RESOLVCONF_FILE "/etc/resolv.conf" #define NTPCONF_FILE "/etc/ntp.conf" -#define RADVD_FILE "/etc/dibbler/radvd.conf" +#define RADVD_FILE "__PREFIX__/etc/dibbler/radvd.conf" #if defined(BSD) -#define SRVPID_FILE "/var/run/dibbler-server.pid" -#define RELPID_FILE "/var/run/dibbler-relay.pid" -#define CLNT_AAASPI_FILE "/var/db/dibbler/AAA/AAA-SPI" -#define SRV_KEYMAP_FILE "/var/db/dibbler/AAA/keys-mapping" +#define SRVPID_FILE "__PREFIX__/var/run/dibbler-server.pid" +#define RELPID_FILE "__PREFIX__/var/run/dibbler-relay.pid" +#define CLNT_AAASPI_FILE "__PREFIX__/var/db/dibbler/AAA/AAA-SPI" +#define SRV_KEYMAP_FILE "__PREFIX__/var/db/dibbler/AAA/keys-mapping" #else -#define SRVPID_FILE "/var/lib/dibbler/server.pid" -#define RELPID_FILE "/var/lib/dibbler/relay.pid" -#define CLNT_AAASPI_FILE "/var/lib/dibbler/AAA/AAA-SPI" -#define SRV_KEYMAP_FILE "/var/lib/dibbler/AAA/keys-mapping" +#define SRVPID_FILE "__PREFIX__/var/lib/dibbler/server.pid" +#define RELPID_FILE "__PREFIX__/var/lib/dibbler/relay.pid" +#define CLNT_AAASPI_FILE "__PREFIX__/var/lib/dibbler/AAA/AAA-SPI" +#define SRV_KEYMAP_FILE "__PREFIX__/var/lib/dibbler/AAA/keys-mapping" #endif -#define SRVLOG_FILE "/var/log/dibbler/dibbler-server.log" -#define RELLOG_FILE "/var/log/dibbler/dibbler-relay.log" +#define SRVLOG_FILE "__PREFIX__/var/log/dibbler/dibbler-server.log" +#define RELLOG_FILE "__PREFIX__/var/log/dibbler/dibbler-relay.log" #define NULLFILE "/dev/null" /* those defines were initially used on Linux only, but hopefully --- Port-bsd/lowlevel-bsd.c.orig 2014-09-16 13:24:42.000000000 -0500 +++ Port-bsd/lowlevel-bsd.c 2019-05-28 00:00:28.000000000 -0500 @@ -492,10 +492,10 @@ char * getAAAKeyFilename(uint32_t SPI) { static char filename[1024]; if (SPI != 0) - snprintf(filename, 1024, "%s%s%x", "/var/lib/dibbler/AAA/", "AAA-key-", + snprintf(filename, 1024, "%s%s%x", DEFAULT_WORKDIR "/AAA/", "AAA-key-", SPI); else - strcpy(filename, "/var/lib/dibbler/AAA/AAA-key"); + strcpy(filename, DEFAULT_WORKDIR "/AAA/AAA-key"); return filename; } --- Port-linux/lowlevel-linux.c.orig 2020-07-23 16:41:34.000000000 -0500 +++ Port-linux/lowlevel-linux.c 2021-08-17 17:03:36.000000000 -0500 @@ -712,9 +712,9 @@ { static char filename[1024]; if (SPI != 0) - snprintf(filename, 1024, "%s%s%08x", "/var/lib/dibbler/AAA/", "AAA-key-", SPI); + snprintf(filename, 1024, "%s%s%08x", DEFAULT_WORKDIR "/AAA/", "AAA-key-", SPI); else - strcpy(filename, "/var/lib/dibbler/AAA/AAA-key"); + strcpy(filename, DEFAULT_WORKDIR "/AAA/AAA-key"); return filename; } --- Port-sun/lowlevel-sun.c.orig 2020-07-23 16:41:34.000000000 -0500 +++ Port-sun/lowlevel-sun.c 2021-08-17 17:03:24.000000000 -0500 @@ -476,10 +476,10 @@ char * getAAAKeyFilename(uint32_t SPI) { static char filename[1024]; if (SPI != 0) - snprintf(filename, 1024, "%s%s%x", "/var/lib/dibbler/AAA/", "AAA-key-", + snprintf(filename, 1024, "%s%s%x", DEFAULT_WORKDIR "/AAA/", "AAA-key-", SPI); else - strcpy(filename, "/var/lib/dibbler/AAA/AAA-key"); + strcpy(filename, DEFAULT_WORKDIR "/AAA/AAA-key"); return filename; } --- doc/examples/client.conf.orig 2014-10-18 13:12:07.000000000 -0500 +++ doc/examples/client.conf 2019-05-28 00:00:28.000000000 -0500 @@ -21,7 +21,7 @@ log-level 7 # Uncomment this line to run script every time response is received -# script "/var/lib/dibbler/client-notify.sh" +# script "__PREFIX__/var/lib/dibbler/client-notify.sh" # Dibbler 1.0.0RC1 and earlier added obtained addresses with /64 prefix. This --- doc/examples/server.conf.orig 2013-10-27 13:33:06.000000000 -0500 +++ doc/examples/server.conf 2019-05-28 00:00:28.000000000 -0500 @@ -12,7 +12,7 @@ log-mode short # Uncomment this line to call script every time a response is sent -#script "/var/lib/dibbler/server-notify.sh" +#script "__PREFIX__/var/lib/dibbler/server-notify.sh" # set preference of this server to 0 (higher = more prefered) preference 0 --- doc/man/dibbler-client.8.orig 2013-10-27 13:33:06.000000000 -0500 +++ doc/man/dibbler-client.8 2019-05-28 00:00:28.000000000 -0500 @@ -76,8 +76,8 @@ More examples can be found in the User's Guide. .SH FILES -All files are created in the /var/lib/dibbler directory. Dibbler -client reads /var/lib/dibbler/client.conf file. During operation, +All files are created in the __PREFIX__/var/lib/dibbler directory. Dibbler +client reads __PREFIX__/var/lib/dibbler/client.conf file. During operation, Dibbler saves various file in that directory. After reception of the DNS servers or domain informations, they are added to the /etc/resolv.conf file. After shutdown, that information is removed --- doc/man/dibbler-relay.8.orig 2013-10-27 13:33:06.000000000 -0500 +++ doc/man/dibbler-relay.8 2019-05-28 00:00:28.000000000 -0500 @@ -93,9 +93,9 @@ .fi .SH FILES -All files are created in the /var/lib/dibbler directory. During operation, +All files are created in the __PREFIX__/var/lib/dibbler directory. During operation, Dibbler saves various file in that directory. Dibbler relay reads -/etc/dibbler/relay.conf file. Log file is named client.log. +__PREFIX__/etc/dibbler/relay.conf file. Log file is named client.log. .SH STANDARDS This implementation aims at conformance to the following standards: --- doc/man/dibbler-server.8.orig 2013-10-27 13:33:06.000000000 -0500 +++ doc/man/dibbler-server.8 2019-05-28 00:00:28.000000000 -0500 @@ -79,8 +79,8 @@ More examples can be found in the User's Guide. .SH FILES -All files are created in the /var/lib/dibbler directory. Dibbler -server reads /var/lib/dibbler/server.conf file. During operation, +All files are created in the __PREFIX__/var/lib/dibbler directory. Dibbler +server reads __PREFIX__/var/lib/dibbler/server.conf file. During operation, Dibbler saves various file in that directory. Log file is named client.log. .SH STANDARDS --- scripts/notify-scripts/server-notify.sh.orig 2013-10-27 13:33:06.000000000 -0500 +++ scripts/notify-scripts/server-notify.sh 2019-05-28 00:00:28.000000000 -0500 @@ -6,7 +6,7 @@ # # Many parameters will be passed as environment variables -LOGFILE=/var/lib/dibbler/server-notify.log +LOGFILE=__PREFIX__/var/lib/dibbler/server-notify.log echo "---$1--------" >> $LOGFILE date >> $LOGFILE