]> git.ipfire.org Git - people/jschlag/network.git/commitdiff
DHCP: dhcpd_subnet_range_new: Make ${range} available throughout function
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 8 Sep 2016 16:44:30 +0000 (18:44 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 8 Sep 2016 16:44:30 +0000 (18:44 +0200)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/functions/functions.dhcpd

index 5e44cd6a6229be29a6241bdb6a3c2b984d9ad5f4..fbce20502e31df8c3297100679d10d17a1097cc1 100644 (file)
@@ -723,12 +723,12 @@ dhcpd_subnet_range_new() {
                        ;;
        esac
        assert isset settings
-       local ${settings}
+       local range ${settings}
 
        while [ $# -gt 0 ]; do
                case "${1}" in
                        *-*)
-                               local range=${1}
+                               range=${1}
 
                                START="${range%-*}"
                                END="${range#*-}"
@@ -762,12 +762,12 @@ dhcpd_subnet_range_new() {
        fi
 
        # Write the configuration to file.
-       local file=$(dhcpd_subnet_range_path ${proto} ${subnet} "${START}-${END}")
+       local file=$(dhcpd_subnet_range_path ${proto} ${subnet} ${range})
        assert isset file
 
        settings_write ${file} ${settings}
 
-       log INFO "DHCP subnet range ${START}-${END} created"
+       log INFO "DHCP subnet range ${range} created"
 
        return ${EXIT_OK}
 }