]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
hooks: Ensure header is empty before populating it.
authorRoy Marples <roy@marples.name>
Fri, 12 Jul 2019 14:04:13 +0000 (15:04 +0100)
committerRoy Marples <roy@marples.name>
Fri, 12 Jul 2019 14:04:13 +0000 (15:04 +0100)
Thanks to Andreas

hooks/20-resolv.conf
hooks/50-ntp.conf

index cf3237499548b211133eec659c012275260e53c3..422d815a44f04089c09ba7c421d11d4476d7c497 100644 (file)
@@ -19,6 +19,7 @@ build_resolv_conf()
        interfaces=$(list_interfaces "$resolv_conf_dir")
 
        # Build the resolv.conf
+       header=
        if [ -n "$interfaces" ]; then
                # Build the header
                for x in ${interfaces}; do
index f1736d362f0d22dbe4bd3ffb66c7c34faa120725..4b68f7776d0e11eb0f96bccee565b7bdd2739953 100644 (file)
@@ -62,6 +62,7 @@ build_ntp_conf()
        # Build a list of interfaces
        interfaces=$(list_interfaces "$ntp_conf_dir")
 
+       header=
        servers=
        if [ -n "$interfaces" ]; then
                # Build the header