Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: GNUser on July 03, 2019, 02:52:07 PM
-
I find that the files in tce/mydata.tgz are consistently restored during boot, but never backed up during shutdown. The only way to back them up is to manually run
$ filetool.sh -b
I'm actually used to this at this point and like it (I'm guaranteed that config files will be identical between reboots unless I change a file and manually run filetool.sh), but I'd like to "troubleshoot" this to understand TCL a little better. Are there any obvious things to check? /opt/shutdown.sh is marked as executable.
-
I'm not using X, am using 'sudo poweroff' and 'sudo reboot'. I guess neither command runs /opt/shutdown.sh. No problem--if I need backup before poweroff or reboot, I'll create a script that calls filetool.sh first.
http://forum.tinycorelinux.net/index.php?topic=6031.0
http://forum.tinycorelinux.net/index.php?topic=11181.0
-
Hi GNUser
I'm not using X, am using 'sudo poweroff' and 'sudo reboot'. ...
Try:
exitcheck.sh shutdown
or:
exitcheck.sh reboot
-
Hi GNUser
That wasn't quite right. Make a file called tcexit for example:
#!/bin/sh
#
# Usage:
# tcexit poweroff Runs a backup and then shuts off the computer.
# tcexit reboot Runs a backup and then reboots the computer.
filetool.sh -b
exitcheck.sh $1
Copy it to your ~/.local/bin directory and make it executable. It will automatically be include in your path so you can call it directly as
shown in the Usage: paragraph above.
-
Thank you, Rich. Yes, that works.
I have gotten used to no backups unless I explicitly make one, but will keep tcexit around in case I change my mind :D
-
/opt/shutdown.sh has this comment:
# put user shutdown commands here
So originally it was "probably" intended as the place for additional shutdown commands?