wpa_supplicant doesn't survive switch_root when started in initramfs
Zack Buhman
zack
Thu Dec 20 17:06:23 PST 2012
In a fairly heretical plan that involves having the root filesystem on
an NFS server, I need to have wpa_supplicant start in initramfs... and
survive the real root replacing the initramfs root.
The latter seems to be quite the problem.
I'd considered creating some sort of "wireless" target that would be
specified in the kernel options, that would Require= some
wpa_supplicant at wlan0.service, as well as the default target, but the
problem with that approach seems to be that the wpa_supplicant process
still seems to be playing with the interface, though seemingly crippled
(presumably because ctrl_interface vanished or something).
In late boot, the wpa_supplicant started in early-boot is still hanging
around.
zack at lab ~
% ps aux | grep wpa
root 93 0.0 0.0 30160 2580 ? Ss 18:28 0:00 wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -Dnl80211 -B
zack 5837 0.0 0.0 10876 1132 pts/0 S+ 18:59 0:00 grep --color=auto wpa
of course things get a little crazy when a second wpa_supplicant
instance is started: http://sprunge.us/Qcdg
So I should mention that the connection doesn't actually go down until a
several sections into late-boot (something about the rekeying magic that
wpa_supplicant does I imagine), so it is hypothetically possible to kill
wpa_supplicant after switch_root, and then try to start it again in late
boot, but I don't consider this to be a particularly good idea (if even
possible).
Is there a sane way to help wpa_supplicant handle switch_root
gracefully?
More information about the Hostap
mailing list