dhclient: Fix overwriting functions.zone
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 2 May 2015 20:22:22 +0000 (20:22 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 2 May 2015 20:22:22 +0000 (20:22 +0000)
src/functions/functions.dhclient

index db23aff..9409b0b 100644 (file)
@@ -121,18 +121,10 @@ dhclient_write_config() {
 
        # Clear configuration file (if any).
        mkdir -p $(dirname ${config_file}) 2>/dev/null
-       : > ${file}
 
        # Print the header.
-       (       echo "#"
-               echo "# This is a dhclient daemon configuration file for ${interface}."
-               echo "# THIS FILE IS AUTOMATICALLY GENERATED AND WILL OVERWRITE"
-               echo "# ANY CUSTOM CHANGES!"
-               echo "#"
-               echo "# $(date -u)"
-               echo "#"
-               echo
-       ) >> "${config_file}"
+       config_header "dhclient daemon configuration file for ${interface}" \
+               > "${config_file}"
 
        # Global options.
        fwrite "${config_file}" "send vendor-class-identifier \"${vendor}\";"