Fix newline generation, #26
authorRoy Marples <roy@marples.name>
Mon, 3 Jun 2013 13:19:24 +0000 (13:19 +0000)
committerRoy Marples <roy@marples.name>
Mon, 3 Jun 2013 13:19:24 +0000 (13:19 +0000)
pdnsd.in

index 0a0241a7c7b3df92e85fee20a020f8b6d598083e..547a2375c96463fd05e8a6c3a68ab825d0e3cb81 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
@@ -82,7 +82,7 @@ change_file()
        return 0
 }
 
-newresolv="# Generated by resolvconf\n"
+newresolv="# Generated by resolvconf$NL"
 changed=false
 
 # Try to ensure that config dirs exist
@@ -94,7 +94,7 @@ 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