local line
local ${NETWORK_CONFIG_DNS_SERVER_PARAMS}
-
- local format="%-20s %-8s"
- print "${format}" "SERVER" "PRIORITY"
-
- while read -r line; do
+ while read line; do
dns_server_parse_line ${line} || continue
- print "${format}" "${server}" "${priority}"
+ print "${server}"
done < ${DNS_SERVER_CONFIG_FILE}
return ${EXIT_OK}
return ${EXIT_OK}
}
+function dns_server_show() {
+ [ -r "${DNS_SERVER_CONFIG_FILE}" ] || return ${EXIT_OK}
+
+ local line
+ local ${NETWORK_CONFIG_DNS_SERVER_PARAMS}
+
+ local format="%-20s %-8s"
+ print "${format}" "SERVER" "PRIORITY"
+
+ while read -r line; do
+ dns_server_parse_line ${line} || continue
+
+ print "${format}" "${server}" "${priority}"
+ done < ${DNS_SERVER_CONFIG_FILE}
+
+ return ${EXIT_OK}
+}
+
function dns_server_add() {
local server=${1}
assert isset server