Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: alphons on January 10, 2023, 05:20:48 AM
-
When booting tinycore the process executes tc-config at the end of the script, it clears screen and shows the text logo and prompt of tinycore. You can use the boot option 'pause' where human interaction is needed to continue. If we add something like sleep 5 to the script, the result of all the actions in the script can be read, which after the boot process continues automatically.
/etc/init.d/tc-config
....
sleep 5
if [ -n "$PAUSE" ]; then
echo -n "${BLUE}Boot time configuration completed. Press <Enter> to continue.${NORMAL}"
read junk
fi
....
Another enhancement can be made by adding some color codes to the filetool restore option.
/usr/bin/filetool.sh
....
echo -n "${BLUE}Restoring backup files from${MAGENTA} $MOUNTPOINT/$FULLPATH/${MYDATA}.tgz${BLUE} "
sudo /bin/tar -C / -zxf $MOUNTPOINT/"$FULLPATH"/${MYDATA}.tgz 2>/dev/null &
rotdash $!
echo "${GREEN}Done.${NORMAL}"
....
The result can be seen in he attached image.
-
Adding a sleep would be a no-no, boot's supposed to be fast, and as you know, the pause bootcode is for the cases when you need to read the contents in depth.
Coloring the backup text would be fine. Want to upload a patch?
-
Sure, i know the pause can be used to STOP the process, but when NOT used, some error messages can not be read, because of the clear screen following.
Maybe some error checking in the script can be used to make a sleep (or read junk) to halt the process for diagnostics, but in 99.99% this is not needed.
So you may be right 8)
Attached the patch file for /usr/bin/filetool.sh
-
Hi, alphons. I'd like to suggest that if filetool.sh's restore text (-r option) will be colorized, backup text (-b option) should also be colorized. To colorize one but not the other would seem haphazard.
You can submit a pull request on github here:
https://github.com/tinycorelinux/Core-scripts/blob/master/usr/bin/filetool.sh
-
Ow yes, forking as we speak ...
-
Maybe some error checking in the script can be used to make a sleep (or read junk) to halt the process for diagnostics, but in 99.99% this is not needed.
too clever for my taste. especially for an edge-case.
but i'll repeat my former request to just not clear the screen instead. (which has been denied before)
maybe the pause bootcode will be a good default for me, i'll try it out, but i'm sure i'll forget before long :D
-
I generally don't like coloring, but I liked the "Done." being on a newline (got used to it, sorry).