xappend "--dhcp-subscrid=$networkid,$subscriberid"
- dhcp_option_add "$cfg" "$networkid"
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
}
dhcp_remoteid_add() {
xappend "--dhcp-remoteid=$networkid,$remoteid"
- dhcp_option_add "$cfg" "$networkid"
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
}
dhcp_circuitid_add() {
xappend "--dhcp-circuitid=$networkid,$circuitid"
- dhcp_option_add "$cfg" "$networkid"
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
}
dhcp_userclass_add() {
xappend "--dhcp-userclass=$networkid,$userclass"
- dhcp_option_add "$cfg" "$networkid"
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
}
dhcp_vendorclass_add() {
xappend "--dhcp-vendorclass=$networkid,$vendorclass"
- dhcp_option_add "$cfg" "$networkid"
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
}
dhcp_host_add() {
local cfg="$1"
+ config_get_bool force "$cfg" force 0
+
config_get networkid "$cfg" networkid
- [ -n "$networkid" ] && dhcp_option_add "$cfg" "$networkid"
+ [ -n "$networkid" ] && dhcp_option_add "$cfg" "$networkid" "$force"
config_get name "$cfg" name
config_get ip "$cfg" ip
xappend "--dhcp-boot=${networkid:+net:$networkid,}$filename,$servername,$serveraddress"
- dhcp_option_add "$cfg" "$networkid"
+ config_get_bool force "$cfg" force 0
+
+ dhcp_option_add "$cfg" "$networkid" "$force"
}
dhcp_option_add() {
local cfg="$1"
local networkid="$2"
+ local force="$3"
+
+ [ "$force" = "0" ] && force=
config_get dhcp_option "$cfg" dhcp_option
for o in $dhcp_option; do
- xappend "--dhcp-option=$networkid","$o"
+ xappend "--dhcp-option${force:+-force}=$networkid","$o"
done
}