Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Initscript stop order? and e2fsck/checkfs after shutdown.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
ChadJoan
n00b
n00b


Joined: 17 Oct 2010
Posts: 38

PostPosted: Fri Dec 24, 2010 3:41 pm    Post subject: Initscript stop order? and e2fsck/checkfs after shutdown. Reply with quote

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
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6747

PostPosted: Fri Dec 24, 2010 4:03 pm    Post subject: Reply with quote

Use baselayout2/openrc. This has an option to run fsck on shutdown.
Back to top
View user's profile Send private message
ChadJoan
n00b
n00b


Joined: 17 Oct 2010
Posts: 38

PostPosted: Thu Dec 30, 2010 6:21 am    Post subject: Reply with quote

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
View user's profile Send private message
PaulBredbury
Watchman
Watchman


Joined: 14 Jul 2005
Posts: 7310

PostPosted: Thu Dec 30, 2010 8:36 am    Post subject: Reply with quote

The nice, easy way:

tune2fs -c 0 -i 0 /dev/sda1
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum