I have found this bug exist in Tinycore V3.7.1 and the current Tinycore V4.3.
if [ -e "/proc/$(</var/run/rebuildfstab.pid)" ]; then
touch /var/run/rebuildfstab.rescan 2>/dev/null
exit
fi
I think the purpose of this condition test is detecting if an instance of this script has already been running, if so, write a "rescan" flag to cause the already running script recan at the end of it, and exit the second script instance.
"$(</var/run/rebuildfstab.pid)" can't get the first running script's pid directory under /proc, and I don't know the usage of something like "$(<filename)". But if I write any string into "/var/run/rebuildfstab.pid", the "if []" condition is always "true".
I can get this work with "$(cat /var/run/rebuildfstab.pid)".