return ${EXIT_OK}
}
+function dhcpd_global_settings_list() {
+ local proto="${1}"
+ assert isset proto
+
+ dhcpd_settings "${proto}"
+}
+
function dhcpd_global_settings_defaults() {
local proto=${1}
assert isset proto
assert isset settings
dhcpd_global_settings_defaults ${proto}
- config_read ${file} ${settings}
+ settings_read ${file} ${settings}
}
function dhcpd_global_settings_write() {
local settings=$(dhcpd_settings ${proto})
assert isset settings
- config_write ${file} ${settings}
+ settings_write ${file} ${settings}
}
function dhcpd_global_options_read() {
local options_file=$(dhcpd_options_file ${proto})
local options_list=$(dhcpd_options_list ${proto})
- config_read_array ${options_file} options ${!options_list}
+ settings_read_array ${options_file} options ${!options_list}
# Check if domain-name is set.
if [ -z "${options["domain-name"]}" ]; then
# XXX Check for subnet collisions!
local file="$(dhcpd_subnet_path ${proto} ${id})/settings"
- config_write ${file} ${settings}
+ settings_write ${file} ${settings}
}
function dhcpd_subnet_remove() {
assert isset id
local file="$(dhcpd_subnet_path ${proto} ${id})/settings"
- config_read ${file}
+ settings_read ${file}
}
function dhcpd_subnet_range_path() {
local file=$(dhcpd_subnet_range_path ${proto} ${subnet_id} ${range_id})
assert isset file
- config_write ${file} ${settings}
+ settings_write ${file} ${settings}
}
function dhcpd_subnet_range_remove() {
assert isset range_id
local file=$(dhcpd_subnet_range_path ${proto} ${subnet_id} ${range_id})
- config_read ${file}
+ settings_read ${file}
}
function dhcpd_subnet_settings() {
function dhcpd_subnet_options_list() {
local proto=${1}
-
- case "${proto}" in
- ipv6)
- print "DHCPV6D_SUBNET_OPTIONS"
- ;;
- ipv4)
- print "DHCPV4D_SUBNET_OPTIONS"
- ;;
- esac
-
- return ${EXIT_OK}
-}
-
-function dhcpd_subnet_options() {
- local proto=${1}
+ assert isset proto
case "${proto}" in
ipv6)
local options_list=${2}
assert isset options_list
- config_read_array ${file} options ${!options_list}
+ settings_read_array ${file} options ${!options_list}
}
function _dhcpd_write_subnet() {