Always add the generated by comment to resolv.conf and remove the default head file.
[openresolv] / libc.in
diff --git a/libc.in b/libc.in
index 6adbebdc0d913a7a32f5a558c084b5d7e68cab09..a67dc82079bc3821506a536351619d4d4d32f5dd 100644 (file)
--- a/libc.in
+++ b/libc.in
@@ -86,7 +86,7 @@ NEWSEARCH="$(uniqify ${NEWSEARCH} ${SEARCH})"
 NEWNS="$(uniqify ${NEWNS} ${NAMESERVERS})"
 
 # Hold our new resolv.conf in a variable to save on temporary files
-NEWCONF=""
+NEWCONF="# Generated by resolvconf\n"
 [ -e "${SYSCONFDIR}"/resolv.conf.head ] \
        && NEWCONF="${NEWCONF}$(cat "${SYSCONFDIR}"/resolv.conf.head)\n"
 [ -n "${NEWSEARCH}" ] && NEWCONF="${NEWCONF}search ${NEWSEARCH}\n"
@@ -129,4 +129,4 @@ for x in "${LIBEXECDIR}"/libc.d/*; do
                retval=$((${retval} + $?))
        fi
 done
-exit ${retval}
\ No newline at end of file
+exit ${retval}