Ticket #16158: patch-config.h.diff

File patch-config.h.diff, 1.5 KB (added by davidgilman1+macports@…, 16 years ago)

update config.h to store pidfile in destroot

  • src/config.h

    old new  
    3333#define HOSTSFILE "/etc/hosts"
    3434#define ETHERSFILE "/etc/ethers"
    3535#ifdef __uClinux__
    36 #  define RESOLVFILE "/etc/config/resolv.conf"
     36#  define RESOLVFILE "__PREFIX__/etc/config/resolv.conf"
    3737#else
    38 #  define RESOLVFILE "/etc/resolv.conf"
     38#  define RESOLVFILE "__PREFIX__/etc/resolv.conf"
     39#endif
     40#ifdef __APPLE__
     41#  define RUNFILE "__PREFIX__/var/run/dnsmasq.pid"
     42#else
     43#define RUNFILE "__PREFIX__/var/run/dnsmasq.pid"
    3944#endif
    40 #define RUNFILE "/var/run/dnsmasq.pid"
    4145#if defined(__FreeBSD__) || defined (__OpenBSD__) || defined(__DragonFly__)
    42 #   define LEASEFILE "/var/db/dnsmasq.leases"
     46#   define LEASEFILE "__PREFIX__/var/db/dnsmasq.leases"
     47#elif __APPLE__
     48#   define LEASEFILE "__PREFIX__/var/db/dnsmasq.leases"
    4349#elif defined(__sun__) || defined (__sun)
    44 #   define LEASEFILE "/var/cache/dnsmasq.leases"
     50#   define LEASEFILE "__PREFIX__/var/cache/dnsmasq.leases"
    4551#else
    46 #   define LEASEFILE "/var/lib/misc/dnsmasq.leases"
     52#   define LEASEFILE "__PREFIX__/var/lib/misc/dnsmasq.leases"
    4753#endif
    4854#if defined(__FreeBSD__)
    49 #   define CONFFILE "/usr/local/etc/dnsmasq.conf"
     55#   define CONFFILE "__PREFIX__/usr/local/etc/dnsmasq.conf"
     56#elif __APPLE__
     57#   define CONFFILE "__PREFIX__/etc/dnsmasq.conf"
    5058#else
    51 #   define CONFFILE "/etc/dnsmasq.conf"
     59#   define CONFFILE "__PREFIX__/etc/dnsmasq.conf"
    5260#endif
    5361#define DEFLEASE 3600 /* default lease time, 1 hour */
    5462#define CHUSER "nobody"