hs20: prepare server using uci-defaults and ship files

Setup user database if non-existent, configure uhttpd .php interpreter
and patch php scripts to work out-of-the-box.
Also ship Hotspot 2.0 SPP and OMA DM XML schema/DTD files needed at
run-time for both client and server.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle
2020-08-17 02:13:44 +01:00
parent 2512c8dcd0
commit 6855683e3e
8 changed files with 373 additions and 21 deletions
+11
View File
@@ -0,0 +1,11 @@
#!/bin/sh
uci -q get uhttpd.main.interpreter | grep -q "^\.php" || uci -q batch <<-EOF >/dev/null
add_list uhttpd.main.interpreter='.php=/usr/bin/php-cgi'
commit uhttpd
EOF
mkdir -p /etc/hs20/AS/DB
[ -e /etc/hs20/AS/DB/eap_user.db ] || sqlite3 /etc/hs20/AS/DB/eap_user.db < /usr/share/hs20/sql.txt
exit 0