]> git.ipfire.org Git - people/stevee/network.git/blobdiff - functions.config
Add documentation about the config options.
[people/stevee/network.git] / functions.config
index 6544a3db0174e1a0fc2ed73274fc752a8ea74f66..a0d58dd0a51f6f778fbea55951ff0d985625ec74 100644 (file)
@@ -27,6 +27,7 @@ function config_read_globals() {
 
 function config_read() {
        local config_file=${1}
+       assert isset config_file
 
        if [ -e "${config_file}" ]; then
                . ${config_file}
@@ -36,6 +37,7 @@ function config_read() {
 
 function config_write() {
        local config_file=${1}
+       assert isset config_file
        shift
 
        # Check if all values to be written are sane
@@ -95,7 +97,7 @@ function network_config_read() {
        # Save state of DEBUG and restore it later.
        local debug=${DEBUG}
 
-       config_read ${CONFIG_FILE}
+       config_read ${NETWORK_CONFIG_FILE}
 
        if [ -n "${debug}" ]; then
                DEBUG=${debug}
@@ -103,7 +105,7 @@ function network_config_read() {
 }
 
 function network_config_write() {
-       config_write ${CONFIG_FILE} ${CONFIG_FILE_PARAMS}
+       config_write ${NETWORK_CONFIG_FILE} ${CONFIG_FILE_PARAMS}
 }
 
 function network_config_print() {