So, is this disabling really still a thing?
It's apparent (
/mod/etc/init.d/S30posttvcrash
) that restarting with a crash log causes the notorious (or crap, take your pick) 'may be disabled' message to be written to a file
/mod/tmp/notify.log
that is then replayed in the pink pop-up box by the Webif if it finds it.
Equally
diag fix-flash-packages
just force-reinstalls any package that is recorded as having installed a file to one of the flash filesystems.
There is the Safe mode startup that can be triggered from the telnet menu or Webif, and causes the startup routines in flash
/var/lib/humaxtv/mod/xinit.d/*
to be skipped.
All in all, from scanning the start-up code and discussions in these forums, I don't see any sign of the active reboot loop protection that has been mentioned here and in documentation.
Is it actually the case that the threatened disabling only occurs if something -- system flush, Humax blob fsck-ing a flash filesystem, ... -- has deleted files from the flash startup directory, and that the CFW doesn't actively disable packages after (some sequence of) crashes, even if it may once have done so?
The following shell script, based on the
fix-flash-packages
diagnostic lists what the diagnostic would try to fix if run, and thus provides an answer to this question.
...
How do I find out what packages are disabled?
...
Code:
#!/bin/sh
# List flash package issues; return 1 if any
main() {
# format file1:file2...
local whitelist="/mod/boot/xinit.d/webshell"
local count=0
local uprm
for uprm in "/mod/var/opkg/info/undelete.postrm"; do
if [ -f "$uprm" ] &&
ls -al "$uprm" | grep -qv '^-rwxr-xr-x '; then
echo "$uprm: wrong permissions"
count=$(($count + 1))
fi
done
# kludge structure needed because of no true global vars in POSIX shell
count=$((count+$(grep ^Package: /mod/var/opkg/status | cut -d: -f2- | cut -c2- | sort | uniq |
while read pkg; do
opkg files "$pkg" | grep ^/mod/boot/ |
while read ff; do
if [ -n "$ff" ] && [ ! -f "$ff" ]; then
echo ":${whitelist}:" | grep -q ":${ff}:" ||
echo "Package $pkg: missing flash file $ff"
fi
done
done |
# wc may not be available
grep -c '' ) ))
[ $count -gt 0 ] && return 1
return 0
}
main
Updated to add a whitelist feature, as at least one installed file is meant to be deleted.