systemd - standard place to run stuff after the network is up?
Clyde E. Kunkel
clydekunkel7734 at cox.net
Mon Oct 17 17:10:37 UTC 2011
On 10/17/2011 10:20 AM, Bruno Wolff III wrote:
> I want to try to modprobe netconsole during boot, but it needs to happen
> after the network is up. Is there any standard place (rc.local and
> modules-load seem to happen too early) to do this?
> I filed https://bugzilla.redhat.com/show_bug.cgi?id=746481 against systemd,
> but it has been closed notabug. So I am looking for simple alternatives
> to do this. If there aren't any, then it looks like I need to make a custom
> service that waits for networking to be up.
FWIW, I have been struggling with this for awhile. And now, in what
seems like "magic," it is working fine in rawhide but not in F16 (tho it
does in maybe 1 in 20 boots). I followed the procedure in
https://fedoraproject.org/wiki/Netconsole. Since the e-net card is
renamed to a local bus name (p37p1 in my case), specifying eth0 in the
netconsole parms wasn't working and systemd was reporting an error and
specifying p37p1 wasn't working since the device was eth0 at the time.
Since updating systemd to systemd-37-1.fc17.x86_64, specifying eth0 now
works nicely to start netconsole logging well before NetworkManager does
its thing and I still get a eth0 network using NetworkManager.
Before the systemd update, I would see the following in dmesg:
[ 12.732929] netconsole: local port 4444
[ 12.734575] netconsole: local IP 192.168.0.10
[ 12.735906] netconsole: interface 'eth0'
[ 12.737225] netconsole: remote port 6666
[ 12.738535] netconsole: remote IP 192.168.0.11
[ 12.739846] netconsole: remote ethernet address 00:1d:60:e5:ee:55
[ 12.741201] netconsole: eth0 doesn't exist, aborting.
[ 12.742528] netconsole: cleaning up
[ 12.747777] mtp-probe: checking bus 8, device 4:
[ 12.749445] mtp-probe: checking bus 2, device 2:
[ 12.751298] mtp-probe: checking bus 8, device 3:
[ 12.752693] fedora-loadmodules: FATAL: Error inserting
No such device
[ 12.754183] systemd: fedora-loadmodules.service: main process
exited, code=exited, status=1
[ 12.773096] systemd: Unit fedora-loadmodules.service entered
More information about the devel