]> git.ipfire.org Git - thirdparty/mdadm.git/commit
mdmon: improve switchroot handling.
authorNeilBrown <neilb@suse.de>
Fri, 29 Jan 2010 01:14:17 +0000 (12:14 +1100)
committerNeilBrown <neilb@suse.de>
Thu, 4 Feb 2010 01:04:18 +0000 (12:04 +1100)
commite98ef2250905e8525bbdc0aab83e07a3de5a70ed
treef088e4615174f26258b8484976458058099f5c68
parentaf7ca334874b86921c7fe76059f33bfddb209296
mdmon: improve switchroot handling.

The change to get mdmon to re-exec itself from the switchroot
filesystem broken switchroot in various ways.  This fixes it.

If the switchroot path is not '/', mdmon will find the pid and
socket for the monitor, chroot to the new root, and exec mdmon
passing the pid in argv[2] and the socket in stdin.

If the switchroot path is actually a number, mdmon will not chroot,
but will kill that pid before taking over the array.

Signed-off-by: NeilBrown <neilb@suse.de>
mdmon.c