+ config_get name "$cfg" name
+ [ -n "$name" ] || return 0
+
+ config_get remoteid "$cfg" remoteid
+ [ -n "$remoteid" ] || return 0
+
+ append args "--dhcp-remoteid=$name,$remoteid"
+
+ dhcp_option_add "$cfg" "$name"
+}
+
+dhcp_circuitid_add() {
+ local cfg="$1"
+
+ config_get name "$cfg" name
+ [ -n "$name" ] || return 0
+
+ config_get circuitid "$cfg" circuitid
+ [ -n "$circuitid" ] || return 0
+
+ append args "--dhcp-circuitid=$name,$circuitid"
+
+ dhcp_option_add "$cfg" "$name"
+}
+
+dhcp_userclass_add() {
+ local cfg="$1"
+
+ config_get name "$cfg" name
+ [ -n "$name" ] || return 0
+
+ config_get userclass "$cfg" userclass
+ [ -n "$userclass" ] || return 0
+
+ append args "--dhcp-userclass=$name,$userclass"
+
+ dhcp_option_add "$cfg" "$name"
+}
+
+dhcp_vendorclass_add() {
+ local cfg="$1"
+
+ config_get name "$cfg" name
+ [ -n "$name" ] || return 0
+
+ config_get vendorclass "$cfg" vendorclass
+ [ -n "$vendorclass" ] || return 0
+
+ append args "--dhcp-vendorclass=$name,$vendorclass"
+
+ dhcp_option_add "$cfg" "$name"
+}
+
+dhcp_host_add() {
+ local cfg="$1"
+
+ config_get name "$cfg" name
+ [ -n "$name" ] && dhcp_option_add "$cfg" "$name"
+
+ config_get mac "$cfg" mac
+ [ -n "$mac" ] || return 0
+
+ config_get ip "$cfg" ip
+ [ -n "$ip" ] || return 0
+
+ append args "--dhcp-host=$mac,$ip${name:+,$name}"
+}
+
+dhcp_mac_add() {
+ local cfg="$1"
+
+ config_get name "$cfg" name
+ [ -n "$name" ] || return 0
+
+ config_get mac "$cfg" mac
+ [ -n "$mac" ] || return 0
+
+ append args "--dhcp-mac=$name,$mac"
+
+ dhcp_option_add "$cfg" "$name"
+}
+
+dhcp_boot_add() {
+ local cfg="$1"
+
+ config_get name "$cfg" name
+
+ config_get filename "$cfg" filename
+ [ -n "$filename" ] || return 0
+
+ config_get servername "$cfg" servername
+ [ -n "$servername" ] || return 0
+
+ config_get serveraddress "$cfg" serveraddress
+ [ -n "$serveraddress" ] || return 0
+
+ append args "--dhcp-boot=${name:+net:$name,}$filename,$servername,$serveraddress"
+
+ dhcp_option_add "$cfg" "$name"
+}
+
+
+dhcp_add() {
+ local cfg="$1"