Gentoo Archives: gentoo-user

From: Daniel Frey <djqfrey@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: Re: [gentoo-user] Run command after root mounted ro?
Date: Wed, 10 Aug 2011 01:05:47
Message-Id: 4E41D912.5040509@gmail.com
In Reply to: Re: [gentoo-user] Run command after root mounted ro? by Florian Philipp
1 On 01/-10/37 11:59, Florian Philipp wrote:
2 > Remounting root read-only is done by an init script called mount-ro
3 > which is started in runlevel shutdown. Try to add a custom init script
4 > to your /etc/init.d directory with the following content:
5 >
6 > #!/sbin/runscript
7 > depend()
8 > {
9 > after mount-ro
10 > }
11 > start()
12 > {
13 > ebegin 'Shutting down mdadm'
14 > mdadm --wait-clean --scan
15 > eend $?
16 > }
17 >
18 > Add it to the runlevel with `rc-update add <your-script> shutdown` and
19 > don't forget to mark it executable.
20 >
21 > Disclaimer: I've not tried this (obviously) and if the script eats your
22 > dog and wreaks your system, it is entirely your fault ;)
23
24
25 Thanks, I tried this out, and while it does run after mounting ro, it
26 just hangs. I've noticed that it's supposed to be monitoring
27 /proc/mdstat but it was (presumably) unmounted long ago.
28
29 I guess I have to do some more experimenting.
30
31 Dan

Replies

Subject Author
Re: [gentoo-user] Run command after root mounted ro? Florian Philipp <lists@×××××××××××.net>