Allows putting resolvconf into /usr/bin.
authorRoy Marples <roy@marples.name>
Tue, 4 Jun 2013 12:05:31 +0000 (12:05 +0000)
committerRoy Marples <roy@marples.name>
Tue, 4 Jun 2013 12:05:31 +0000 (12:05 +0000)
Thanks to Jan Alexander Steffens.

Makefile
dnsmasq.in
libc.in
named.in
pdns_recursor.in
pdnsd.in
unbound.in

index 47bf6befd41419540a7223545b4b95d779260bfe..ae17f8409929df6a39aee51dee7251d44a8914e2 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -17,7 +17,7 @@ TARGET=               ${RESOLVCONF} ${SUBSCRIBERS}
 SRCS=          ${TARGET:C,$,.in,} # pmake
 SRCS:=         ${TARGET:=.in} # gmake
 
-SED_PREFIX=            -e 's:@PREFIX@:${PREFIX}:g'
+SED_SBINDIR=           -e 's:@SBINDIR@:${SBINDIR}:g'
 SED_SYSCONFDIR=                -e 's:@SYSCONFDIR@:${SYSCONFDIR}:g'
 SED_LIBEXECDIR=                -e 's:@LIBEXECDIR@:${LIBEXECDIR}:g'
 SED_VARDIR=            -e 's:@VARDIR@:${VARDIR}:g'
@@ -29,7 +29,7 @@ SED_RESTARTCMD=               -e 's:@RESTARTCMD \(.*\)@:${RESTARTCMD}:g'
 all: ${TARGET}
 
 .in:
-       ${SED}  ${SED_PREFIX} ${SED_SYSCONFDIR} ${SED_LIBEXECDIR} \
+       ${SED}  ${SED_SBINDIR} ${SED_SYSCONFDIR} ${SED_LIBEXECDIR} \
                ${SED_VARDIR} ${SED_RCDIR} ${SED_RESTARTCMD} \
                $< > $@
 
index 96b5593ea978dfffd1000cc531875f26977eaa79..542acaa5b19d7813dfdd239f5015eb743e62680f 100644 (file)
@@ -29,7 +29,7 @@
 [ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0
 . "@SYSCONFDIR@/resolvconf.conf" || exit 1
 [ -z "$dnsmasq_conf" -a -z "$dnsmasq_resolv" ] && exit 0
-[ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)"
+[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)"
 NL="
 "
 
@@ -154,7 +154,7 @@ fi
 if type config_mkdirs >/dev/null 2>&1; then
        config_mkdirs "$dnsmasq_conf" "$dnsmasq_resolv"
 else
-       @PREFIX@/sbin/resolvconf -D "$dnsmasq_conf" "$dnsmasq_resolv"
+       @SBINDIR@/resolvconf -D "$dnsmasq_conf" "$dnsmasq_resolv"
 fi
 
 changed=false
diff --git a/libc.in b/libc.in
index c4233d5cdbea480ccfe0f8a1ee2442c053b496ed..945efc826889dde3485d4f1b82d1fe99870bbce2 100644 (file)
--- a/libc.in
+++ b/libc.in
@@ -97,7 +97,7 @@ fi
 : ${resolv_conf:=/etc/resolv.conf}
 : ${libc_service:=nscd}
 : ${libc_restart:=@RESTARTCMD ${libc_service}@}
-: ${list_resolv:=@PREFIX@/sbin/resolvconf -l}
+: ${list_resolv:=@SBINDIR@/resolvconf -l}
 if [ "${resolv_conf_head-x}" = x -a -f "$SYSCONFDIR"/resolv.conf.head ]; then
        resolv_conf_head="$(cat "${SYSCONFDIR}"/resolv.conf.head)"
 fi
@@ -130,7 +130,7 @@ case "${resolv_conf_passthrough:-NO}" in
        newconf="$(cat "$newest")$NL"
        ;;
 *)
-       [ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)"
+       [ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)"
        newsearch="$(uniqify $search_domains $SEARCH $search_domains_append)"
        NS="$LOCALNAMESERVERS $NAMESERVERS"
        newns=
index 1ee3abc443e5e189b0ab4b9d3b1668378f2a25af..43ceabb5e972caa3ace50c6e55c54747f7550ebd 100644 (file)
--- a/named.in
+++ b/named.in
@@ -29,7 +29,7 @@
 [ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0
 . "@SYSCONFDIR@/resolvconf.conf" || exit 1
 [ -z "$named_zones" -a -z "$named_options" ] && exit 0
-[ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)"
+[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)"
 NL="
 "
 
@@ -78,7 +78,7 @@ done
 if type config_mkdirs >/dev/null 2>&1; then
        config_mkdirs "$named_options" "$named_zones"
 else
-       @PREFIX@/sbin/resolvconf -D "$named_options" "$named_zones"
+       @SBINDIR@/resolvconf -D "$named_options" "$named_zones"
 fi
 
 # No point in changing files or reloading bind if the end result has not
index 04ee6073555ed0dab48c5d3946fa0968f24f88e1..2919e7d0ff378f910138be754f50b93cb6024ce8 100644 (file)
@@ -29,7 +29,7 @@
 [ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0
 . "@SYSCONFDIR@/resolvconf.conf" || exit 1
 [ -z "$pdns_zones" ] && exit 0
-[ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)"
+[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)"
 NL="
 "
 
@@ -61,7 +61,7 @@ done
 if type config_mkdirs >/dev/null 2>&1; then
        config_mkdirs "$pdnsd_zones"
 else
-       @PREFIX@/sbin/resolvconf -D "$pdnsd_zones"
+       @SBINDIR@/resolvconf -D "$pdnsd_zones"
 fi
 
 if [ ! -f "$pdns_zones" ] || \
index 547a2375c96463fd05e8a6c3a68ab825d0e3cb81..59a4755aff16b9f530c2b5dbf40219955c7cd68f 100644 (file)
--- a/pdnsd.in
+++ b/pdnsd.in
@@ -29,7 +29,7 @@
 [ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0
 . "@SYSCONFDIR@/resolvconf.conf" || exit 1
 [ -z "$pdnsd_conf" -a -z "$pdnsd_resolv" ] && exit 0
-[ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)"
+[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)"
 NL="
 "
 
@@ -89,7 +89,7 @@ changed=false
 if type config_mkdirs >/dev/null 2>&1; then
        config_mkdirs "$pdnsd_resolv" "$pdnsd_conf"
 else
-       @PREFIX@/sbin/resolvconf -D "$pdnsd_resolv" "$pdnsd_conf"
+       @SBINDIR@/resolvconf -D "$pdnsd_resolv" "$pdnsd_conf"
 fi
 
 if [ -n "$pdnsd_resolv" ]; then
index 4ee0da7202633fac6d14dfa697495c648c274bab..633c7f0dffc1f3feb8d929fbfbac7a026a6024f6 100644 (file)
@@ -29,7 +29,7 @@
 [ -f "@SYSCONFDIR@"/resolvconf.conf ] || exit 0
 . "@SYSCONFDIR@/resolvconf.conf" || exit 1
 [ -z "$unbound_conf" ] && exit 0
-[ -z "$RESOLVCONF" ] && eval "$(@PREFIX@/sbin/resolvconf -v)"
+[ -z "$RESOLVCONF" ] && eval "$(@SBINDIR@/resolvconf -v)"
 NL="
 "
 
@@ -60,7 +60,7 @@ fi
 if type config_mkdirs >/dev/null 2>&1; then
        config_mkdirs "$unbound_conf"
 else
-       @PREFIX@/sbin/resolvconf -D "$unbound_conf"
+       @SBINDIR@/resolvconf -D "$unbound_conf"
 fi
 
 if [ ! -f "$unbound_conf" ] || \