On 01/-10/37 11:59, Florian Philipp wrote:
> Remounting root read-only is done by an init script called mount-ro
> which is started in runlevel shutdown. Try to add a custom init script
> to your /etc/init.d directory with the following content:
>
> #!/sbin/runscript
> depend()
> {
> after mount-ro
> }
> start()
> {
> ebegin 'Shutting down mdadm'
> mdadm --wait-clean --scan
> eend $?
> }
>
> Add it to the runlevel with `rc-update add <your-script> shutdown` and
> don't forget to mark it executable.
>
> Disclaimer: I've not tried this (obviously) and if the script eats your
> dog and wreaks your system, it is entirely your fault ;)
Thanks, I tried this out, and while it does run after mounting ro, it
just hangs. I've noticed that it's supposed to be monitoring
/proc/mdstat but it was (presumably) unmounted long ago.
I guess I have to do some more experimenting.
Dan