The generated S90lighttpd ran lighttpd with 2>/dev/null, so a config
parse error, a failed bind, a missing module or an unwritable log path
all produced exactly "FAIL" and nothing else. That is the one message
that says why the web UI is not there.
Append stderr to /var/log/lighttpd-start.log instead.
Buildroot removed thttpd (Config.in.legacy, "no longer maintained
actively by upstream"), so arc-buildroot-essential moves to lighttpd
1.4.82 as part of the 6.18 kernel bump. This is the loader side of that
change; the two have to land together.
darkhttpd was ruled out because the web UI is CGI-driven - eight scripts
under /var/www/data, with auth.cgi reading /etc/shadow - and darkhttpd
has no CGI support at all. The CGI scripts themselves use plain CGI/1.1
(REQUEST_METHOD, QUERY_STRING, CONTENT_LENGTH) with no thttpd-specific
behavior, so they are unchanged.
functions.sh still overrides the init script when repacking the initrd,
so it now writes S90lighttpd. Two differences from the thttpd version:
- thttpd took its document root, port and CGI pattern on the command
line. lighttpd reads them from a config file, so the script writes a
small wrapper to /var/run that includes /etc/lighttpd/lighttpd.conf
and overrides the port from /etc/arc.conf.
- the port override uses ":=" (force-assign). A plain "=" on a key the
included config already set is a fatal "Duplicate config variable"
error in lighttpd, not a last-one-wins override.
Running as root is preserved via server.username/groupname in the
shipped config, since auth.cgi and change-password.cgi touch /etc/shadow.
init.sh watches /var/run/lighttpd.pid instead of thttpd.pid, and the
port-change handler in arc-functions.sh restarts S90lighttpd.
bs=1M is MiB while stick capacity is advertised in decimal GB, so 3850
produced a 4.04 GB image that does not fit a 4GB device at all. 3700 MiB
is 3.88 GB, leaving a 3.0% margin under 4,000,000,000 B.
That is the same margin as the earlier seek=1850 (1.94 GB against a 2GB
device, 00409cfa), and it also clears real sticks that report less than
a full 4 GB. p3 ends up at 3600M.
The locale prune was commented out in 617af555 and had the wrong path
anyway: grub-install copies from the staged share/grub tree, so removing
share/locale alone left the 42 .mo files (~6 MB, joke locales included)
that actually land in boot/grub/locale.
Also drop GRUB's bundled starfield example theme (~2.8 MB). It is never
referenced: grub.cfg points at ${prefix}/theme/theme.txt, which getTheme
fills from the arc-theme release at build time.
thttpd does not remove its pidfile when it dies, so a crash left the
file behind pointing at a dead pid. The boot guard only tested that the
file existed, concluded the server was up and skipped the restart, so
nothing was listening while the loader carried on and reported an ip.
That is the connection refused on a running system. Test the pid with
kill -0 instead and clear the file before restarting.
The shipped init script had no monitor loop to catch this later, and its
stop() bailed out with FAIL when the pidfile was missing, so restart
could not recover a thttpd that was running without one. Fall back to
killall in that case, and never signal a recorded pid that is no longer
alive since the number may have been recycled.
loaderPorts compared the new port against HTTPPORT, which arc.conf had
already been rewritten to hold, so the restart was skipped on a real
change. Capture the running port before the rewrite.