nodogsplash: fix uci configuration by fixing append_config_option
authorAlexander Couzens <lynxis@fe80.eu>
Thu, 5 Mar 2015 11:52:01 +0000 (12:52 +0100)
committerAlexander Couzens <lynxis@fe80.eu>
Thu, 5 Mar 2015 17:00:52 +0000 (18:00 +0100)
append_config_option doesn't wrote anything to nodogsplash.conf.

nodogsplash/files/nodogsplash.init

index 3352aa9..424058e 100755 (executable)
@@ -36,13 +36,13 @@ nolog() {
 # will append "BindAddress 192.168.1.1" if uci bind_address is '192.168.1.1'
 append_config_option() {
   local val=""
-  local cfg="$1"
-  local config_file="$2"
+  local config_file="$1"
+  local cfg="$2"
   local option_name="$3"
   local config_counterpart="$4"
   local default="$5"
   config_get val "$cfg" "$option_name" "$default"
-  [ -n "$val" ] && echo "" >> $config_file
+  [ -n "$val" ] && echo "$config_counterpart $val" >> $config_file
 }
 
 setup_user_authentication() {