The LuCI web-interface is no longer loading, so I checked on the device and tried restarting lighttpd.
This have an error saying that /etc/lighttpd/conf.d/ was empty - it wasn't, but the only file present was named '005-webdav.conf' followed by two unprintable control-characters.
The contents of this file is:
$HTTP["host"] == "" {^M
server.document-root = ""^M
dir-listing.activate = "disable^M"^M
webdav.activate = "disable^M"^M
webdav.is-readonly = "disable^M"^M
webdav.sqlite-db-name = "/var/run/lighttpd-webdav-lock.db"^M
EOF^M
if [ "" -eq 1 ]; then^M
cat <<EOF>>/etc/lighttpd/conf.d/005-webdav.conf^M^M
auth.backend = "htpasswd"^M
auth.backend.htpasswd.userfile = "/etc/lighttpd/.htpasswd^M"^M
auth.require = ( "" => ( "method" => "basic",^M
"realm" => "webdav",^M
"require" => "valid-user" ) )^M
EOF^M
fi^M
echo "}" >> /etc/lighttpd/conf.d/005-webdav.conf^M^M
echo >> /etc/lighttpd/conf.d/005-webdav.conf^M^M
}^M
^M
do_user() {^M
local section="enabled"^M
local u^M
local p^M
local OPT^M
config_get u "enabled^M" "name"^M
config_get p "enabled^M" "password"^M
[ ! -e "/etc/lighttpd/.htpasswd^M" ] && OPT=-c^M
if [ -n "" -a -n "" ]; then^M
echo "" | htpasswd /etc/lighttpd/.htpasswd^M "" >/dev/null 2>/dev/null^M
fi^M
}^M
^M
vhost() {^M
local section="enabled"^M
local ip=""^M
config_get name "enabled^M" "name"^M
config_get enabled "enabled^M" "enabled"^M
if [ "" -gt 0 ]; then^M
echo " " >> /etc/lighttpd/webdav.vhosts^M^M
fi^M
}^M
^M
^M
reset_setting() {^M
^M
default_path=/mnt/usbs^M
^M
for share_entry in webdav.@partition[0] ; do^M
uci delete ^M
done^M ^M
uci add webdav partition^M
uci set webdav.@partition[-1].name='almondplus'^M
uci set webdav.@partition[-1].path=^M
uci set webdav.@partition[-1].read_only=1^M
uci set webdav.@partition[-1].dirlisting=1^M
uci set webdav.@partition[-1].readonly=1^M
uci set webdav.@partition[-1].authenticated=1^M
uci set webdav.@partition[-1].enabled=0^M
uci rename webdav.@partition[-1]=^M
uci commit webdav^M
}^M
^M
boot() {^M
reset_setting^M
start^M
}^M
^M
start() {^M
local ipaddr=10.1.137.9^M
config_load webdav^M
/bin/rm -f /etc/lighttpd/conf.d/005-webdav.conf^M^M
config_foreach partition partition^M
/bin/rm -f /etc/lighttpd/webdav.vhosts^M^M
config_foreach vhost partition ^M
/bin/rm -f /etc/lighttpd/.htpasswd^M^M
config_foreach do_user user^M
}^M
^M
# Called by GUI, should re-create conf files, then restart lighttpd^M
reload() {^M
start "enabled"^M
[ -x "/etc/init.d/lighttpd" ] && /etc/init.d/lighttpd enabled && {^M
/etc/init.d/lighttpd reload^M
}^M
[ -x "/etc/init.d/dnsmasq" ] && /etc/init.d/dnsmasq enabled && {^M
/etc/init.d/dnsmasq reload^M
}^M
}^M
$HTTP["host"] == "" {^M
server.document-root = ""^M
dir-listing.activate = "disable^M"^M
webdav.activate = "disable^M"^M
webdav.is-readonly = "disable^M"^M
webdav.sqlite-db-name = "/var/run/lighttpd-webdav-lock.db"^M
EOF^M
if [ "" -eq 1 ]; then^M
cat <<EOF>>/etc/lighttpd/conf.d/005-webdav.conf^M^M
auth.backend = "htpasswd"^M
auth.backend.htpasswd.userfile = "/etc/lighttpd/.htpasswd^M"^M
auth.require = ( "" => ( "method" => "basic",^M
"realm" => "webdav",^M
"require" => "valid-user" ) )^M
EOF^M
fi^M
echo "}" >> /etc/lighttpd/conf.d/005-webdav.conf^M^M
echo >> /etc/lighttpd/conf.d/005-webdav.conf^M^M
}^M
^M
do_user() {^M
local section="enabled"^M
local u^M
local p^M
local OPT^M
config_get u "enabled^M" "name"^M
config_get p "enabled^M" "password"^M
[ ! -e "/etc/lighttpd/.htpasswd^M" ] && OPT=-c^M
if [ -n "" -a -n "" ]; then^M
echo "" | htpasswd /etc/lighttpd/.htpasswd^M "" >/dev/null 2>/dev/null^M
fi^M
}^M
^M
vhost() {^M
local section="enabled"^M
local ip=""^M
config_get name "enabled^M" "name"^M
config_get enabled "enabled^M" "enabled"^M
if [ "" -gt 0 ]; then^M
echo " " >> /etc/lighttpd/webdav.vhosts^M^M
fi^M
}^M
^M
^M
reset_setting() {^M
^M
default_path=/mnt/usbs^M
^M
for share_entry in webdav.@partition[0] ; do^M
uci delete ^M
done^M
^M
uci add webdav partition^M
uci set webdav.@partition[-1].name='almondplus'^M
uci set webdav.@partition[-1].path=^M
uci set webdav.@partition[-1].read_only=1^M
uci set webdav.@partition[-1].dirlisting=1^M
uci set webdav.@partition[-1].readonly=1^M
uci set webdav.@partition[-1].authenticated=1^M
uci set webdav.@partition[-1].enabled=0^M
uci rename webdav.@partition[-1]=^M
uci commit webdav^M
}^M
^M
boot() {^M
reset_setting^M
start^M
}^M
^M
start() {^M
local ipaddr=10.1.137.9^M
config_load webdav^M
/bin/rm -f /etc/lighttpd/conf.d/005-webdav.conf^M^M
config_foreach partition partition^M
/bin/rm -f /etc/lighttpd/webdav.vhosts^M^M
config_foreach vhost partition ^M
/bin/rm -f /etc/lighttpd/.htpasswd^M^M
config_foreach do_user user^M
}^M
^M
# Called by GUI, should re-create conf files, then restart lighttpd^M
reload() {^M
start "enabled"^M
[ -x "/etc/init.d/lighttpd" ] && /etc/init.d/lighttpd enabled && {^M
/etc/init.d/lighttpd reload^M
}^M
[ -x "/etc/init.d/dnsmasq" ] && /etc/init.d/dnsmasq enabled && {^M
/etc/init.d/dnsmasq reload^M
}^M
}^M
$HTTP["host"] == "" {^M
server.document-root = ""^M
dir-listing.activate = "disable^M"^M
webdav.activate = "disable^M"^M
webdav.is-readonly = "disable^M"^M
webdav.sqlite-db-name = "/var/run/lighttpd-webdav-lock.db"^M
EOF^M
if [ "" -eq 1 ]; then^M
cat <<EOF>>/etc/lighttpd/conf.d/005-webdav.conf^M^M
auth.backend = "htpasswd"^M
auth.backend.htpasswd.userfile = "/etc/lighttpd/.htpasswd^M"^M
auth.require = ( "" => ( "method" => "basic",^M
"realm" => "webdav",^M
"require" => "valid-user" ) )^M
EOF^M
fi^M
echo "}" >> /etc/lighttpd/conf.d/005-webdav.conf^M^M
echo >> /etc/lighttpd/conf.d/005-webdav.conf^M^M
}^M
^M
do_user() {^M
local section="enabled"^M
local u^M
local p^M
local OPT^M
config_get u "enabled^M" "name"^M
config_get p "enabled^M" "password"^M
[ ! -e "/etc/lighttpd/.htpasswd^M" ] && OPT=-c^M
if [ -n "" -a -n "" ]; then^M
echo "" | htpasswd /etc/lighttpd/.htpasswd^M "" >/dev/null 2>/dev/null^M
fi^M
}^M
^M
vhost() {^M
local section="enabled"^M
local ip=""^M
config_get name "enabled^M" "name"^M
config_get enabled "enabled^M" "enabled"^M
if [ "" -gt 0 ]; then^M
echo " " >> /etc/lighttpd/webdav.vhosts^M^M
fi^M
}^M
^M
^M
reset_setting() {^M
^M
default_path=/mnt/usbs^M
^M
for share_entry in webdav.@partition[0] ; do^M
uci delete ^M
done^M
^M
uci add webdav partition^M
uci set webdav.@partition[-1].name='almondplus'^M
uci set webdav.@partition[-1].path=^M
uci set webdav.@partition[-1].read_only=1^M
uci set webdav.@partition[-1].dirlisting=1^M
uci set webdav.@partition[-1].readonly=1^M
uci set webdav.@partition[-1].authenticated=1^M
uci set webdav.@partition[-1].enabled=0^M
uci rename webdav.@partition[-1]=^M
uci commit webdav^M
}^M
^M
boot() {^M
reset_setting^M
start^M
}^M
^M
start() {^M
local ipaddr=10.1.137.9^M
config_load webdav^M
/bin/rm -f /etc/lighttpd/conf.d/005-webdav.conf^M^M
config_foreach partition partition^M
/bin/rm -f /etc/lighttpd/webdav.vhosts^M^M
config_foreach vhost partition ^M
/bin/rm -f /etc/lighttpd/.htpasswd^M^M
config_foreach do_user user^M
}^M
^M
# Called by GUI, should re-create conf files, then restart lighttpd^M
reload() {^M
start "enabled"^M
[ -x "/etc/init.d/lighttpd" ] && /etc/init.d/lighttpd enabled && {^M
/etc/init.d/lighttpd reload^M
}^M
[ -x "/etc/init.d/dnsmasq" ] && /etc/init.d/dnsmasq enabled && {^M
/etc/init.d/dnsmasq reload^M
}^M
}^M
... so, other than perhaps needing to run dos2unix, it appears that something has caused the code used to generate lighttpd configuration files to be copied/echoed into the destination files... although having said this, the presence of control-characters in the filename makes me wonder whether there's actually some filesystem corruption going on here.
Am I going to need to restore my firmware, or would a reboot (or some service restart) fix this issue?