18 December 2013

On bypassing mdadm's interactive mode

So I wanted mdadm to not go interactive, ever, but instead just bail out whenever something happens it doesn't understand; you'd think the developers would have thought of that, right? Turns out they haven't.
The 'fix' is easy enough though: pipe /bin/false through mdadm by default so it'll get a 'false' every time it would be looking for user input; effectively making it bail out whenever something's off:

alias mdadm="/bin/false | /sbin/mdadm"

No comments:

Post a Comment