Tiny Core Extensions > TCE Bugs

Hack-font.tcz's tce.installed file is called Hack-fonts

<< < (2/2)

Rich:
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


--- Quote from: GNUser on April 14, 2020, 08:25:01 PM ---Hi, Rich. It does this:

--- Code: ---#!/bin/sh
fc-cache -r
--- End code ---
...
--- End quote ---

Maybe try having it block if  rcS  is still running:

--- Code: ---#!/bin/sh

while true
do
sleep 1
pgrep rcS >/dev/null && continue
sleep 1
break
done

fc-cache -r
--- End code ---

    [EDIT]: Changed tc-config to rcS.  Rich

andyj:
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:


--- Code: ---#!/bin/sh
#
pgrep rcS >/dev/null || fc-cache -r &

--- End code ---

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.

Rich:
Hi andyj
Updated my previous post. Thanks for the reminder. I forgot  tc-config  gets called from  rcS.

GNUser:

--- Quote from: andyj on April 14, 2020, 11:40:25 PM ---I can however tell if the system is booting or not and run fc-cache based on that:


--- Code: ---#!/bin/sh
#
pgrep rcS >/dev/null || fc-cache -r &

--- End code ---

--- End quote ---
That's beautiful, andyj. Exactly what we need here.


--- Quote from: andyj on April 14, 2020, 11:40:25 PM ---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.

--- End quote ---
tce.installed/fontconfig runs fc-cache, so no need to run it manually or via bootlocal.sh.

Navigation

[0] Message Index

[*] Previous page

Go to full version