You are not logged in.

#1 2016-08-09 10:45:08

rokidakota
Member
Registered: 2014-11-22
Posts: 34

macchanger with netctl-auto often hanging during boot

Hi,

I have a systemd service to start macchanger on the wireless network. It used to work fine until about one or two months ago. Since then it often gets stuck during boot for 60 seconds or more.

The service is active and looks like this:

[Unit]
Description=macchanger on %I
Wants=network-pre.target
Before=network-pre.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device

[Service]
ExecStart=/usr/bin/macchanger -e %I
Type=oneshot

[Install]
WantedBy=multi-user.target

Sometimes it does not get stuck. I wonder if netctl auto is starting the wifi before macchanger has a chance to run. Could that be the issue? How can I debug this? There's no errors afaik.

BTW. While booting, when stuck, I can press x and then it continues booting (I assume without changing the mac address).

Offline

#2 2016-08-09 13:35:37

JohnBobSmith
Member
From: Canada
Registered: 2014-11-29
Posts: 804

Re: macchanger with netctl-auto often hanging during boot

That file looks weird in multiple ways to me, though I am not a a systemd expert. First thing:

Wants=network-pre.target
Before=network-pre.target

How can you want something before you want it?? I hope I'm making sense on this part. It might be harmless though... The real thing that I expect will cause delays is if network-pre.target is starting before sys-subsystem-net-devices-%i.device and has to wait for sys-subsystem-net-devices-%i.device to finish its job, because it cannot load until after this .device has completed. I have no idea what the start order of systemd files and services are but this may be worth looking into. smile


I am diagnosed with bipolar disorder. As it turns out, what I thought was my greatest weakness is now my greatest strength.

Everyday, I make a conscious choice to overcome my challenges and my problems. It's not easy, but its better than the alternative...

Offline

#3 2016-08-10 08:01:48

rokidakota
Member
Registered: 2014-11-22
Posts: 34

Re: macchanger with netctl-auto often hanging during boot

The Wants and Before also looked strange to me (also not systemd expert), but that's what's shown as an example at https://wiki.archlinux.org/index.php/MA … s_spoofing

In any case the delay happens randomly. Today there was no delay at all. I suspect it is related to how long it takes to auto-connect to the wireless network.
I'll try to figure out the order in which those events are supposed to happen. If someone knows, I would be happy to hear smile

Offline

Board footer

Powered by FluxBB