Tiny Core Linux
Tiny Core Extensions => TCE Bugs => Topic started by: GNUser on April 14, 2020, 02:40:08 PM
-
As in the subject. The script should be called Hack-font, not Hack-fonts. It's a merely cosmetic issue that causes tce-status -i to output an inaccurate count of the number of loaded extensions (one more than the true number).
-
I noticed that too. I was beginning to think I was the only one who used it. It's on my todo list to fix.
-
While on the topic, the script adds 16 seconds to my boot time and causes some boot-time errors ("fonts failed to write cache").
Eliminating the script seems to have no ill side effects--boot-time errors go away, boots faster, font still works fine in the terminal
-
Hi GNUser
What does the script do? Is it a variation of the fontconfig fc-cache issue that cropped up here:
http://forum.tinycorelinux.net/index.php/topic,23333.msg146167.html#msg146167
-
Hi, Rich. It does this:
#!/bin/sh
fc-cache -r
It wreaks havoc during boot (delay and several errors/warnings). My workaround is to just delete the script from the extension. There are no bad side effects as far as I can tell.
fontconfig.tcz is a dependency of Hack-font.tcz and is therefore also being loaded at boot time. Since tce.installed scripts are run as a batch after all extensions have loaded, by the time tce.installed/fontconfig runs, it "sees" Hack-font and includes it in the font cache.
I guess the only time Hack-font's tce.installed script would be needed is when the extension is loaded after boot.
-
Hi GNUser
That's the same command (different options) that caused the slow booting when fontconfig.tcz was loaded in this thread:
http://forum.tinycorelinux.net/index.php/topic,23333.msg146167.html#msg146167
Hi, Rich. It does this:
#!/bin/sh
fc-cache -r
...
Maybe try having it block if rcS is still running:
#!/bin/sh
while true
do
sleep 1
pgrep rcS >/dev/null && continue
sleep 1
break
done
fc-cache -r
[EDIT]: Changed tc-config to rcS. Rich
-
One problem is that there currently does not exist a way to run a command at the end of the boot process as part of a extension loaded during boot. Right now this can only be done by manually editing files. I can however tell if the system is booting or not and run fc-cache based on that:
#!/bin/sh
#
pgrep rcS >/dev/null || fc-cache -r &
If rcS is not running, then the system is not booting and the font cache will be refreshed. This would move the requirement to the user to manually run fc-cache at the time of their choosing from one of the many files that are run at the end of tc-config, though usually this is /opt/bootlocal.sh.
I don't know what the errors are about. I added strace to my onboot, and ran fc-cache with it in bootsync.sh. It's not clear to me what the problem is.
-
Hi andyj
Updated my previous post. Thanks for the reminder. I forgot tc-config gets called from rcS.
-
I can however tell if the system is booting or not and run fc-cache based on that:
#!/bin/sh
#
pgrep rcS >/dev/null || fc-cache -r &
That's beautiful, andyj. Exactly what we need here.
This would move the requirement to the user to manually run fc-cache at the time of their choosing from one of the many files that are run at the end of tc-config, though usually this is /opt/bootlocal.sh.
tce.installed/fontconfig runs fc-cache, so no need to run it manually or via bootlocal.sh.