Tiny Core Base > TCB Talk

Running custom script at halt/reboot

(1/3) > >>

bmarkus:
I'm missing a custom script which is executed during shutdown/reboot. A practical example is to save amixer settings in a file to restore volume for next boot.

fratermus:
Agreed;  something like an /opt/shutdownlocal.sh companion to /opt/bootlocal.sh would be useful.

Coincident with the change to the busybox-provisioned mount  my /mnt/sdb1 no longer gets u[n]mounted at shutdown, resulting in errors that have to be fscked away ("not cleanly unmounted" or similar).    At least I think that's what's happening.  If I umount it manually then reboot all is well.  If I leave it mounted and reboot, it won't mount again until fsck.ext2 cleans it up. 

Having /opt/shutdownlocal.sh would allow me to programatically umount the flash card as part of the shutdown process. 

roberts:
Sounds completely reasonable. Will do for 2.7.

jur:
How about adding a line to exitcheck.sh? (Is exitcheck always called?)

roberts:
Yes, as you can surely see umix is commented out in exitcheck, so that would be where the call would occur.

Navigation

[0] Message Index

[#] Next page

Go to full version