diff --git a/configs/ath79-generic.config b/configs/ath79-generic.config index 5626047e..363663bb 100644 --- a/configs/ath79-generic.config +++ b/configs/ath79-generic.config @@ -25,7 +25,7 @@ CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_bullet-m-xw=y CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_lap-120=y CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_litebeam-ac-gen2=y CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_litebeam-ac-lr=y -CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanobeam-2ac-13=y +#CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanobeam-2ac-13=y CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanobeam-ac-gen2=y CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanobeam-ac=y CONFIG_TARGET_DEVICE_ath79_generic_DEVICE_ubnt_nanobeam-ac-xc=y diff --git a/files/app/root.ut b/files/app/root.ut index 1cac4e80..522af215 100644 --- a/files/app/root.ut +++ b/files/app/root.ut @@ -437,13 +437,15 @@ global.handle_request = function(env) if (pageCache[tpath] || fs.access(tpath)) { auth.runAuthentication(env); - if (secured && !auth.isAdmin && config.authenable) { - uhttpd.send("Status: 401 Unauthorized\r\n\r\n"); - return; - } - if (env.REQUEST_METHOD !== "GET" && config.authenable && !(auth.isAdmin || auth.isFirstUse)) { - uhttpd.send("Status: 401 Unauthorized\r\n\r\n"); - return; + if (config.authenable && !auth.isAdmin) { + if (secured) { + uhttpd.send("Status: 401 Unauthorized\r\n\r\n"); + return; + } + if (env.REQUEST_METHOD !== "GET" && configuration.isConfigured() && page !== "authenticate") { + uhttpd.send("Status: 401 Unauthorized\r\n\r\n"); + return; + } } const args = {}; if (env.CONTENT_TYPE === "application/x-www-form-urlencoded") { diff --git a/files/usr/local/bin/aredn_init b/files/usr/local/bin/aredn_init index 539df51b..3f90735a 100755 --- a/files/usr/local/bin/aredn_init +++ b/files/usr/local/bin/aredn_init @@ -229,6 +229,8 @@ if aredn.info.get_nvram("configured") ~= "0" then -- Reboot when necessary if nixio.fs.stat("/tmp/reboot-required") then print "Rebooting node" + os.execute("/sbin/mount_root done") + os.execute("/bin/sync") os.execute("/sbin/reboot") end end