OpenWrt – Diff between revs 2 and 3

Subversion Repositories:
Rev:
Show entire fileIgnore whitespace
Rev 2 Rev 3
Line 72... Line 72...
72 fi 72 fi
73 echo "${prefix}:${username}:${password}" >>$httpdconf 73 echo "${prefix}:${username}:${password}" >>$httpdconf
74 haveauth=1 74 haveauth=1
75 } 75 }
Line 76... Line -...
76   -  
77 append_lua_prefix() { -  
78 local v="$1" -  
79 local prefix="${v%%=*}" -  
80 local handler="${v#*=}" -  
81   -  
82 if [ "$prefix" != "$handler" ] && [ -n "$prefix" ] && [ -f "$handler" ]; then -  
83 procd_append_param command -l "$prefix" -L "$handler" -  
84 else -  
85 echo "Skipping invalid Lua prefix \"$v\"" >&2 -  
86 fi -  
87 } -  
88   76  
89 start_instance() 77 start_instance()
90 { 78 {
91 UHTTPD_CERT="" 79 UHTTPD_CERT=""
Line 115... Line 103...
115 append_arg "$cfg" home "-h" 103 append_arg "$cfg" home "-h"
116 append_arg "$cfg" realm "-r" "${realm:-OpenWrt}" 104 append_arg "$cfg" realm "-r" "${realm:-OpenWrt}"
117 append_arg "$cfg" config "-c" 105 append_arg "$cfg" config "-c"
118 append_arg "$cfg" cgi_prefix "-x" 106 append_arg "$cfg" cgi_prefix "-x"
119 [ -f /usr/lib/uhttpd_lua.so ] && { 107 [ -f /usr/lib/uhttpd_lua.so ] && {
120 local len -  
121 config_get len "$cfg" lua_prefix_LENGTH -  
122   -  
123 if [ -n "$len" ]; then -  
124 config_list_foreach "$cfg" lua_prefix append_lua_prefix -  
125 else -  
126 config_get prefix "$cfg" lua_prefix 108 config_get handler "$cfg" lua_handler
127 config_get handler "$cfg" lua_handler 109 [ -f "$handler" ] && append_arg "$cfg" lua_prefix "-l" && {
128 append_lua_prefix "$prefix=$handler" 110 procd_append_param command "-L" "$handler"
129 fi 111 }
130 } 112 }
131 [ -f /usr/lib/uhttpd_ubus.so ] && { 113 [ -f /usr/lib/uhttpd_ubus.so ] && {
132 append_arg "$cfg" ubus_prefix "-u" 114 append_arg "$cfg" ubus_prefix "-u"
133 append_arg "$cfg" ubus_socket "-U" 115 append_arg "$cfg" ubus_socket "-U"
134 append_bool "$cfg" ubus_cors "-X" 0 116 append_bool "$cfg" ubus_cors "-X" 0