Tiny Core Base > Micro Core
MicroCore and shutdown.sh
batnas:
In TinyCore i have /opt/shutdown.sh running every time i shutdown the pc.
MicroCore does not. I fiddled around, and found that shutdown.sh is called from /usr/bin/exitcheck.
Exitcheck is again called from exittc. exittc is an X-program(the one when you click shutdown), and thereby not able to run in MC.
I have checked in MC 2.9, MC 3.0 Alpha3 and TC 3.0Alpha1
Soultion:
Either exitcheck should not be included in MC OR the exitcheck in MC should be called by some shutdown-script in MC
Am i completely wrong?? or does someone check this?
\\Batnas
Kingdomcome:
Simple answer is to use exitcheck.sh as your shutdown/reboot command. However beware that there is a small issue with only using exitcheck.sh to shut down, a backup is NOT performed, you must manually run "filetool.sh backup" before exitcheck.sh.
The cause of the issue is that at the top of exitcheck.sh the backup is only run if the file /tmp/do_backup is present, which is created by the exittc gui if the box is checked or the env var BACKUP = 1. The problem here is that if X is not running, then the exittc gui cannot be run and /tmp/do_backup is not touched.
maro:
Whilst I drafted a response in another thread I also just realized that '/opt/shutdown.sh' does not come into play for MC or people using sudo poweroff or sudo reboot. IIRC the '/etc/init.d/rc.shutdown' will still be executed in those cases and might be a better place from which to call '/opt/shutdown.sh'.
batnas:
--- Quote from: maro on May 14, 2010, 07:45:09 PM --- the '/etc/init.d/rc.shutdown' will still be executed in those cases and might be a better place from which to call '/opt/shutdown.sh'.
--- End quote ---
I do agree.
It is kinda silly to have the nice function, and not use it.
The idea of havin shutdown.sh is that it is executed every time the machine is shut down - whether using exittc, 'sudo reboot' or anything else.
\\Batnas
cosmin_ap:
so no way to cleanly shutdown daemons in mc then?
Navigation
[0] Message Index
[#] Next page
Go to full version