Release openresolv-3.7.1
[openresolv] / pdnsd.in
index 0a0241a7c7b3df92e85fee20a020f8b6d598083e..59a4755aff16b9f530c2b5dbf40219955c7cd68f 100644 (file)
--- a/pdnsd.in
+++ b/pdnsd.in
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (c) 2010-2011 Roy Marples
+# Copyright (c) 2010-2013 Roy Marples
 # All rights reserved
 
 # pdnsd subscriber for resolvconf
@@ -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="
 "
 
@@ -82,19 +82,19 @@ change_file()
        return 0
 }
 
-newresolv="# Generated by resolvconf\n"
+newresolv="# Generated by resolvconf$NL"
 changed=false
 
 # Try to ensure that config dirs exist
 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
        for n in $NAMESERVERS; do
-               newresolv="${newresolv}nameserver $n\n"
+               newresolv="${newresolv}nameserver $n$NL"
        done
 fi
 
@@ -146,7 +146,7 @@ if [ -w "$pdnsd_conf" ]; then
        fi
        if change_file "$pdnsd_conf" "$cf"; then
                changed=true
-       fi      
+       fi
 fi
 
 if [ -n "$pdnsd_resolv" ]; then