Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: bapon on November 01, 2014, 07:50:06 AM
-
Hi,
my backup (.filetool.lst) on shutdown is only configured for alsa file asound.state.
Works fine, when I run "sudo alsactl store" on a terminal before shutdown.
Doesn't work though when the "alsactl store" command is put in shutdown.sh.
On reboot: settings are lost.
Apparently my command in shutdown.sh gets run after backup.
Any ideas?
Thank you.
-
Hi,
do I really have to change filelist.sh and precede it's content by the command I wish to run before backup?
As a consequence I would have to backup filelist.sh too.
Or is there a less dirty solution?
-
hi bapon,
i experienced the same problem.
i want to safe the popstate.dat-files of my mail-accounts in thunderbird,
to prevent that my previously checked emails are downloaded again and again.
for this reason i want to safe these popstate.date-files at every shutdown,
that i get only new mails downloaded.
unfortunately i didn' t succeed, too.
so i also welcom every help and hint.
-
Hi bapon
I think you might need to insert a script ahead of the /usr/bin/exittc binary to run commands prior to the backup being run. Though
messing with the system commands is generally not a good idea, the simplest way is probably:
sudo mv /usr/bin/exittc /usr/bin/exittc.real
sudo editor /usr/bin/exittc
When the editor comes up, type the following and save it:
#!/bin/sh
# This script replaced /usr/bin/exittc which was renamed to /usr/bin/exittc.real so
# that these commands are run first.
sudo alsactl store
exittc.real
Make the script executable
sudo chmod 770 /usr/bin/exittc
Add the following to /opt/filetool.lst
usr/bin/exittc
exittc.real
I have not tested this but I think it will work.
[EDIT]: Added missing call to exittc.real in script.
-
Hi Rich,
thanks for replying.
I guessed it would get dirty.
-
Hi,
since I didn't have your instructions in front of me, I did it similarly:
1. Rename exittc to exittc.real
2. write new exittc as shellscript with all necessary commands in it and in the end calling exittc.real from exittc.
This worked fine.
Thanks a lot.
-
Hi bapon
Thanks for confirming it works. Your post reminded me that I left out the call to exittc.real at the end of the sample script which
has now been corrected.