]> git.ipfire.org Git - people/stevee/network.git/commitdiff
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 db23aff6a7c42e3e0e185b694a5e4d7b4cdb6cd4..9409b0b7b70c78ce9399cd51e006f8fbbd39c441 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}\";"