You are not logged in.

#1 2016-10-31 21:12:04

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

[Solved] Turn off one network at boot?

In my recent previous post (https://bbs.archlinux.org/viewtopic.php?id=218844) I was discussing a laptop that had a WiFi system on-off button.

I have the same situation now but for my desktop upstairs that has a USB WiFI dongle but not a wireless on/off switch.

Same story: I have two networks under two different ISP's that I want to be able to switch between - the network connected to the wireless will be used much less frequently. At the moment I have my configuration using systemd-networkd and it brings up both the ethernet and wireless interfaces just fine and gets me two IP addresses. The wired interface wins out as I want. However, I would like the wireless network to be DOWN by default and I will bring it up, and shut down the ethernet network when required with a bash script.

How do I tell systemd-networkd to not bring up the wireless network at boot, or find some other way to put it DOWN by default just after boot?

Last edited by lagagnon (2016-11-03 14:39:39)


Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

#2 2016-10-31 23:26:34

ukhippo
Member
From: Non-paged pool
Registered: 2014-02-21
Posts: 366

Re: [Solved] Turn off one network at boot?

Could you not use rfkill to soft (un)block the wifi?
Or just manually start/stop the wpa_supplicant@... service?

Offline

#3 2016-11-02 10:28:31

rsmarples
Member
Registered: 2009-05-12
Posts: 287

Re: [Solved] Turn off one network at boot?

Why go to such complicated lengths?
Assign each interface a metric (lowest wins) and hopefully the software will assign this metric to every route, so when the wired it UP it will always be used regardless of the wireless state.
dhcpcd can do this, I don't know about anything else.

Offline

#4 2016-11-02 11:20:06

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: [Solved] Turn off one network at boot?

lagagnon wrote:

I have my configuration using systemd-networkd and it brings up both...
How do I tell systemd-networkd to not bring up the wireless network at boot

WTF?

Nothing is automatic in arch.  If you don' want the wireless network started at boot, don't configure it to start at boot.  Oddly you specifically note that you've configured it to start at boot ... but you don't want it to.  So don't configure it that way!


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2016-11-03 14:39:25

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

Re: [Solved] Turn off one network at boot?

Yeah, thanks all. I wasn't thinking too clearly. I have turned off the netctl systemd unit I had set to autstart. Now I just turn it on manually when I need it.


Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

Board footer

Powered by FluxBB