View previous topic :: View next topic |
Author |
Message |
ChadJoan n00b
Joined: 17 Oct 2010 Posts: 38
|
Posted: Fri Dec 24, 2010 3:41 pm Post subject: Initscript stop order? and e2fsck/checkfs after shutdown. |
|
|
Hello,
How does gentoo determine the order in which initscripts have their stop() functions run?
My ultimate objective is to make all of the filesystem checks (ex: e2fsck) run at shutdown instead of at bootup. If I'm booting my computer then I'm doing so because I'll be using it. A 30 minute boot time to check a 500 GB partition is completely unacceptable. If I can run these at shutdown then they might actually get done.
I've added a stop() function to checkfs that does everything the start() function did. Unfortunately it tries to do checkfs's stop() routine before localmount's stop() routine and fails because the filesystems haven't been unmounted yet. I'd like to know how to make it run after the filesystems are unmounted. |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Fri Dec 24, 2010 4:03 pm Post subject: |
|
|
Use baselayout2/openrc. This has an option to run fsck on shutdown. |
|
Back to top |
|
|
ChadJoan n00b
Joined: 17 Oct 2010 Posts: 38
|
Posted: Thu Dec 30, 2010 6:21 am Post subject: |
|
|
Thanks for pointing that out!
It'll probably be a while before I try it though. The migration looks like it has a significant chance of breaking my system, so I'll have to wait until I have a couple spare days ahead just incase I need to fix things. |
|
Back to top |
|
|
PaulBredbury Watchman
Joined: 14 Jul 2005 Posts: 7310
|
Posted: Thu Dec 30, 2010 8:36 am Post subject: |
|
|
The nice, easy way:
tune2fs -c 0 -i 0 /dev/sda1 |
|
Back to top |
|
|
|