Ticket #39602: patch-prefix.diff

File patch-prefix.diff, 8.4 KB (added by fclaire@…, 11 years ago)
  • Misc/Portable.h

    old new  
    161161#endif
    162162
    163163#if defined(LINUX) || defined(BSD) || defined(SUNOS)
    164 #define WORKDIR            "/var/lib/dibbler"
     164#define WORKDIR            "@@PREFIX@@/var/lib/dibbler"
    165165#define DEFAULT_SCRIPT     ""
    166 #define CLNTCONF_FILE      "/etc/dibbler/client.conf"
    167 #define SRVCONF_FILE       "/etc/dibbler/server.conf"
    168 #define RELCONF_FILE       "/etc/dibbler/relay.conf"
     166#define CLNTCONF_FILE      "@@PREFIX@@/etc/dibbler/client.conf"
     167#define SRVCONF_FILE       "@@PREFIX@@/etc/dibbler/server.conf"
     168#define RELCONF_FILE       "@@PREFIX@@/etc/dibbler/relay.conf"
    169169#define RESOLVCONF_FILE    "/etc/resolv.conf"
    170170#define NTPCONF_FILE       "/etc/ntp.conf"
    171 #define RADVD_FILE         "/etc/dibbler/radvd.conf"
    172 #define CLNTPID_FILE       "/var/lib/dibbler/client.pid"
    173 #define SRVPID_FILE        "/var/lib/dibbler/server.pid"
    174 #define RELPID_FILE        "/var/lib/dibbler/relay.pid"
    175 #define CLNTLOG_FILE       "/var/log/dibbler/dibbler-client.log"
    176 #define SRVLOG_FILE        "/var/log/dibbler/dibbler-server.log"
    177 #define RELLOG_FILE        "/var/log/dibbler/dibbler-relay.log"
     171#define RADVD_FILE         "@@PREFIX@@/etc/dibbler/radvd.conf"
     172#define CLNTPID_FILE       "@@PREFIX@@/var/lib/dibbler/client.pid"
     173#define SRVPID_FILE        "@@PREFIX@@/var/lib/dibbler/server.pid"
     174#define RELPID_FILE        "@@PREFIX@@/var/lib/dibbler/relay.pid"
     175#define CLNTLOG_FILE       "@@PREFIX@@/var/log/dibbler/dibbler-client.log"
     176#define SRVLOG_FILE        "@@PREFIX@@/var/log/dibbler/dibbler-server.log"
     177#define RELLOG_FILE        "@@PREFIX@@/var/log/dibbler/dibbler-relay.log"
    178178#define NULLFILE           "/dev/null"
    179179
    180180/* those defines were initially used on Linux only, but hopefully
  • Misc/Portable.h.in

    old new  
    161161#endif
    162162
    163163#if defined(LINUX) || defined(BSD) || defined(SUNOS)
    164 #define WORKDIR            "/var/lib/dibbler"
     164#define WORKDIR            "@@PREFIX@@/var/lib/dibbler"
    165165#define DEFAULT_SCRIPT     ""
    166 #define CLNTCONF_FILE      "/etc/dibbler/client.conf"
    167 #define SRVCONF_FILE       "/etc/dibbler/server.conf"
    168 #define RELCONF_FILE       "/etc/dibbler/relay.conf"
     166#define CLNTCONF_FILE      "@@PREFIX@@/etc/dibbler/client.conf"
     167#define SRVCONF_FILE       "@@PREFIX@@/etc/dibbler/server.conf"
     168#define RELCONF_FILE       "@@PREFIX@@/etc/dibbler/relay.conf"
    169169#define RESOLVCONF_FILE    "/etc/resolv.conf"
    170170#define NTPCONF_FILE       "/etc/ntp.conf"
    171 #define RADVD_FILE         "/etc/dibbler/radvd.conf"
    172 #define CLNTPID_FILE       "/var/lib/dibbler/client.pid"
    173 #define SRVPID_FILE        "/var/lib/dibbler/server.pid"
    174 #define RELPID_FILE        "/var/lib/dibbler/relay.pid"
    175 #define CLNTLOG_FILE       "/var/log/dibbler/dibbler-client.log"
    176 #define SRVLOG_FILE        "/var/log/dibbler/dibbler-server.log"
    177 #define RELLOG_FILE        "/var/log/dibbler/dibbler-relay.log"
     171#define RADVD_FILE         "@@PREFIX@@/etc/dibbler/radvd.conf"
     172#define CLNTPID_FILE       "@@PREFIX@@/var/lib/dibbler/client.pid"
     173#define SRVPID_FILE        "@@PREFIX@@/var/lib/dibbler/server.pid"
     174#define RELPID_FILE        "@@PREFIX@@/var/lib/dibbler/relay.pid"
     175#define CLNTLOG_FILE       "@@PREFIX@@/var/log/dibbler/dibbler-client.log"
     176#define SRVLOG_FILE        "@@PREFIX@@/var/log/dibbler/dibbler-server.log"
     177#define RELLOG_FILE        "@@PREFIX@@/var/log/dibbler/dibbler-relay.log"
    178178#define NULLFILE           "/dev/null"
    179179
    180180/* those defines were initially used on Linux only, but hopefully
  • Port-bsd/lowlevel-bsd.c

    old new  
    492493    uint32_t ret;
    493494    FILE *file;
    494495
    495     strcpy(filename, "/var/lib/dibbler/AAA/AAA-SPI");
     496    strcpy(filename, "@@PREFIX@@/var/lib/dibbler/AAA/AAA-SPI");
    496497
    497498    if (stat(filename, &st))
    498499        return 0;
     
    510511char * getAAAKeyFilename(uint32_t SPI) {
    511512    static char filename[1024];
    512513    if (SPI != 0)
    513         snprintf(filename, 1024, "%s%s%x", "/var/lib/dibbler/AAA/", "AAA-key-",
     514        snprintf(filename, 1024, "%s%s%x", "@@PREFIX@@/var/lib/dibbler/AAA/", "AAA-key-",
    514515            SPI);
    515516    else
    516         strcpy(filename, "/var/lib/dibbler/AAA/AAA-key");
     517        strcpy(filename, "@@PREFIX@@/var/lib/dibbler/AAA/AAA-key");
    517518    return filename;
    518519}
    519520
  • doc/examples/client.conf

    old new  
    2121log-level 7
    2222
    2323# Uncomment this line to run script every time response is received
    24 # script "/var/lib/dibbler/client-notify.sh"
     24# script "@@PREFIX@@/var/lib/dibbler/client-notify.sh"
    2525
    2626
    2727# Current Dibbler release adds obtained addresses with /64 prefix. Although
  • doc/examples/server.conf

    old new  
    1212log-mode short
    1313
    1414# Uncomment this line to call script every time a response is sent
    15 #script "/var/lib/dibbler/server-notify.sh"
     15#script "@@PREFIX@@/var/lib/dibbler/server-notify.sh"
    1616
    1717# set preference of this server to 0 (higher = more prefered)
    1818preference 0
  • doc/man/dibbler-client.8

    old new  
    7676More examples can be found in the User's Guide.
    7777
    7878.SH FILES
    79 All files are created in the /var/lib/dibbler directory. Dibbler
    80 client reads /var/lib/dibbler/client.conf file. During operation,
     79All files are created in the @@PREFIX@@/var/lib/dibbler directory. Dibbler
     80client reads @@PREFIX@@/var/lib/dibbler/client.conf file. During operation,
    8181Dibbler saves various file in that directory. After reception of the
    8282DNS servers or domain informations, they are added to the
    8383/etc/resolv.conf file. After shutdown, that information is removed
  • doc/man/dibbler-server.8

    old new  
    7979More examples can be found in the User's Guide.
    8080
    8181.SH FILES
    82 All files are created in the /var/lib/dibbler directory. Dibbler
    83 server reads /var/lib/dibbler/server.conf file. During operation,
     82All files are created in the @@PREFIX@@/var/lib/dibbler directory. Dibbler
     83server reads @@PREFIX@@/var/lib/dibbler/server.conf file. During operation,
    8484Dibbler saves various file in that directory.  Log file is named client.log.
    8585
    8686.SH STANDARDS
  • doc/man/dibbler-relay.8

    old new  
    9393.fi
    9494
    9595.SH FILES
    96 All files are created in the /var/lib/dibbler directory. During operation,
     96All files are created in the @@PREFIX@@/var/lib/dibbler directory. During operation,
    9797Dibbler saves various file in that directory. Dibbler relay reads
    98 /etc/dibbler/relay.conf file. Log file is named client.log.
     98@@PREFIX@@/etc/dibbler/relay.conf file. Log file is named client.log.
    9999
    100100.SH STANDARDS
    101101This implementation aims at conformance to the following standards:
  • scripts/notify-scripts/client-notify-bsd.sh

    old new  
    44# This script was tested on OpenBSD, but it is likely to work on other BSDs as well.
    55
    66version="v0.2.3-openbsd"
    7 LOGFILE=/var/lib/dibbler/client-notify-bsd.log
     7LOGFILE=@@PREFIX@@/var/lib/dibbler/client-notify-bsd.log
    88
    99# uncomment this to get full list of available variables
    1010set >> $LOGFILE
     
    7171
    7272if [ -n "$PREFIX1" ]; then
    7373    echo "Prefix ${PREFIX1} (operation $1) to client $REMOTE_ADDR on inteface $IFACE/$IFINDEX" >> $LOGFILE
    74     PREFIXIFACE=`cat /etc/dibbler/client.conf | grep -i downlink | grep -v -e '^#' | awk -F" " '{ print $2; }' | sed 's/\"//g'`
     74    PREFIXIFACE=`cat @@PREFIX@@/etc/dibbler/client.conf | grep -i downlink | grep -v -e '^#' | awk -F" " '{ print $2; }' | sed 's/\"//g'`
    7575    ifconfig $PREFIXIFACE inet6 "$PREFIX1"1 prefixlen $PREFIX1LEN
    7676fi
    7777
  • scripts/notify-scripts/server-notify.sh

    old new  
    66#
    77# Many parameters will be passed as environment variables
    88
    9 LOGFILE=/var/lib/dibbler/server-notify.log
     9LOGFILE=@@PREFIX@@/var/lib/dibbler/server-notify.log
    1010
    1111echo "---$1--------" >> $LOGFILE
    1212date >> $LOGFILE