Is there supposed to be an option to choose fast restart?I'll also add support for the 'faster reboot' method discovered by prpr (see https://hummy.tv/forum/threads/restart-humax-software-without-a-reboot.6958/).
--- /mod/webif/lib/bin/reboot.old
+++ /mod/webif/lib/bin/reboot
@@ -79,7 +79,7 @@
# Stop mod services
for f in /mod/etc/init.d/S??*; do
- [ -f "$f" ] || continue
+ [ -x "$f" ] || continue
$f stop
done
# ls -l /mod/etc/init.d/S00env.sh
-rw-rw-rw- 1 root root 101 Jul 5 2011 /mod/etc/init.d/S00env.sh
dir=/mod/etc/init.d
for f in `ls -r1 $dir/S*` ; do
echo " $f stop"
$f stop
done
for f in /mod/etc/init.d/S??*; do
[ -f "$f" ] || continue
$f stop
done
I don't have any non executable files in /mod/etc/init.d/ so wouldn't be suffering from the -f / -x bug but I am still seeing the reboot following scheduled event wakeup ending up in standby.
I missed the -r in your version. I will update mine, thanks.I went to the trouble of making sure things were stopped in the reverse order to which they were started, which can be important, but that seems to have been 'simplified' out, wrongly IMHO.
I think that the fast reboot should as far as possible do the same as a normal reboot, only faster, and the EPG data aren't removed during a standard boot.The code to delete the EPG cached data didn't make it either. I can't really see why not as the epg.dat (or epgsavedata) file serves no real purpose, being recreated almost immediately after restart, and leaving it there just accumulates a few stagnant entries which the Humax software seemingly 'forgets' to delete, causing other problems downstream.
The script doesn't fail, it just outputs an error, doesn't it? (and then, just on a fast reboot)Ecpanding on the above, I seem to have the following script left around which does not have execute permission.
It doesn't seem to be owned by any package but does cause the reboot script to fail with permission denied if the above patch has not been applied.
Unless you're doing something from the command line, it isn't fast rebooting.How can we tell if the box is fast booting or not please? Mine seems to go through the 'normal' boot procedure, and without getting a stopwatch out to time it, it takes about the same length of time.
I think the EPG cache should be removed during a standard (WebIf induced) reboot as well. It's the only opportunity to do so in an automated manner and I don't see any downsides to it.I think that the fast reboot should as far as possible do the same as a normal reboot, only faster, and the EPG data aren't removed during a standard boot.
I see you've special-cased dropbear not to be killed. This is necessary if you're accessing the prompt through SSH, as killing the daemon stops the script half-way though if you don't. However, you do need to restart the daemon somehow, otherwise it is left non-operational afterwards as its filesystem access to the disk is yanked away beneath it.The script that does the reboot is at /mod/webif/lib/bin/reboot and this is also what is run from the Jim {system reboot} command which things like rs use.
The above problem occurred because the code did not accurately unwindEcpanding on the above, I seem to have the following script left around which does not have execute permission.
...Code:# ls -l /mod/etc/init.d/S00env.sh -rw-rw-rw- 1 root root 101 Jul 5 2011 /mod/etc/init.d/S00env.sh
/etc/init.d/rcS.mod
, which allows for both sourced and executed scripts. Instead of checking for execute permission, it would be more correct to do s/t like this, which executes any script that is meant to be executable and wouldn't need to be stopped if wasn't (since it wouldn't have been started):...
# Stop mod services
# shellcheck.net prefers this ...
for f in $(set -- /mod/etc/init.d/S??*; for f; do echo "$f"; done | sort -r); do
# ... to the current
# for f in `ls -1r /mod/etc/init.d/S??*`; do
[ -f "$f" ] || continue
# Don't stop the SSH server
echo $f | grep -q dropbear && continue
case "$f" in
*.sh)
(
trap - INT QUIT TSTP
set -- stop
. "$f"
) ;;
*) #
"$f" stop
;;
done
...