Append a newline when restoring resolv.conf.
authorRoy Marples <roy@marples.name>
Tue, 13 Sep 2016 15:11:09 +0000 (15:11 +0000)
committerRoy Marples <roy@marples.name>
Tue, 13 Sep 2016 15:11:09 +0000 (15:11 +0000)
Thanks to Mike Gilbert.

libc.in

diff --git a/libc.in b/libc.in
index aed7f7d0ff084f0fcfdd364d76523806926481d3..d49be65b67be6f009027a79a9e7be47730b12e39 100644 (file)
--- a/libc.in
+++ b/libc.in
@@ -216,7 +216,7 @@ fi
 if $backup; then
        if [ "$newconf" = "$signature$NL" ]; then
                if [ -e "$resolv_conf.bak" ]; then
-                       newconf="$(cat "$resolv_conf.bak")"
+                       newconf="$(cat "$resolv_conf.bak")$NL"
                fi
        elif [ -e "$resolv_conf" ]; then
                read line <"$resolv_conf"