]> 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:05:11 +0000 (15:05 +0100)
Thanks to Andreas

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

index 61c75e82141c9cabf58e355fe4549c064d2b33d8..204763be76e3426ec70ed89aad06fdf3d708ddff 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