From: Roy Marples Date: Fri, 12 Jul 2019 14:04:13 +0000 (+0100) Subject: hooks: Ensure header is empty before populating it. X-Git-Tag: v7.2.4~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ae2301035c623b5dff3989b81e3f7e9f89ccc2c;p=thirdparty%2Fdhcpcd.git hooks: Ensure header is empty before populating it. Thanks to Andreas --- diff --git a/hooks/20-resolv.conf b/hooks/20-resolv.conf index 61c75e82..204763be 100644 --- a/hooks/20-resolv.conf +++ b/hooks/20-resolv.conf @@ -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 diff --git a/hooks/50-ntp.conf b/hooks/50-ntp.conf index f1736d36..4b68f777 100644 --- a/hooks/50-ntp.conf +++ b/hooks/50-ntp.conf @@ -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