diff --git a/net/isc-dhcp/files/dhcpd.init b/net/isc-dhcp/files/dhcpd.init index 76fa34ae6..7eb3dc3af 100755 --- a/net/isc-dhcp/files/dhcpd.init +++ b/net/isc-dhcp/files/dhcpd.init @@ -364,7 +364,9 @@ gen_dhcp_subnet() { echo " default-lease-time $leasetime;" echo " max-lease-time $leasetime;" fi - echo " option routers $gateway;" + if [ "$defaultroute" -eq 1 ] ; then + echo " option routers $gateway;" + fi echo " option domain-name-servers $DNS;" config_list_foreach "$cfg" "routes" append_routes config_list_foreach "$cfg" "dhcp_option" append_dhcp_options @@ -374,7 +376,7 @@ gen_dhcp_subnet() { dhcpd_add() { local cfg="$1" synthesize="$2" local dhcp6range="::" - local dynamicdhcp end gateway ifname ignore leasetime limit net netmask + local dynamicdhcp defaultroute end gateway ifname ignore leasetime limit net netmask local proto networkid start subnet local IP NETMASK BROADCAST NETWORK PREFIX DNS START END @@ -404,6 +406,8 @@ dhcpd_add() { config_get_bool dynamicdhcp "$cfg" "dynamicdhcp" 1 + config_get_bool defaultroute "$cfg" "default_route" 1 + dhcp_ifs="$dhcp_ifs $ifname" eval "$(ipcalc.sh $subnet $start $limit)"