changeset 4552:d62e5b96b66e draft

hooks: Ensure header is empty before populating it. Thanks to Andreas
author Roy Marples <roy@marples.name>
date Fri, 12 Jul 2019 15:04:13 +0100
parents 1b9e9a69b187
children 8289f982fb87
files hooks/20-resolv.conf hooks/50-ntp.conf
diffstat 2 files changed, 2 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/hooks/20-resolv.conf	Tue Jul 09 10:27:38 2019 +0100
+++ b/hooks/20-resolv.conf	Fri Jul 12 15:04:13 2019 +0100
@@ -19,6 +19,7 @@
 	interfaces=$(list_interfaces "$resolv_conf_dir")
 
 	# Build the resolv.conf
+	header=
 	if [ -n "$interfaces" ]; then
 		# Build the header
 		for x in ${interfaces}; do
--- a/hooks/50-ntp.conf	Tue Jul 09 10:27:38 2019 +0100
+++ b/hooks/50-ntp.conf	Fri Jul 12 15:04:13 2019 +0100
@@ -62,6 +62,7 @@
 	# Build a list of interfaces
 	interfaces=$(list_interfaces "$ntp_conf_dir")
 
+	header=
 	servers=
 	if [ -n "$interfaces" ]; then
 		# Build the header