Ask Your Question
0

How to change regulatory domain for network manager?

asked 2016-05-24 06:58:56 -0600

matinlotfali gravatar image

updated 2016-05-24 12:56:15 -0600

florian gravatar image

I want to run this command at Fedora 23 startup.

iw reg set US

I've put it in /etc/rc.d/rc.local but it starts after the network manager.

How can I run it before that?

edit retag flag offensive close merge delete

Comments

1

You could create a script and run it as systemd service that will run before Network Manager.

aeperezt gravatar imageaeperezt ( 2016-05-24 10:16:10 -0600 )edit

please guide me how to write a script and how to run it as systemd service. So I will mark it as answer.

matinlotfali gravatar imagematinlotfali ( 2016-05-24 11:47:42 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted
0

answered 2016-05-24 12:42:39 -0600

aeperezt gravatar image

You will need to write a script name something like iw-set.sh and add it on the /usr/loca/sbin you script should be something like:

#!/bin/bash
/usr/sbin/iw reg set US

You need to set is as executable to do so:

chmod 777 /usr/local/sbin/iw-set.sh

The you should write a systemd init file

[Unit]
Description=Set iw settings
Before=NetworkManager.service

[Service]
Type=oneshot
ExecStart= /usr/loca/sbin/iw-set.sh

[Install]
WantedBy=multi-user.target

This file should be placed on /etc/systemd/system/ named something iw-set.service and with 664 permits so

chmod 664 /etc/systemd/system/iw-set.service

Then you can test ti by issueing

systemctl daemon-reload
systemctl start iw-set.service

if all goes well you could enable at boot with

systemctl enable iw-set.service

While I have not tested, will recommend you to read systemd documentation and google a bit. https://access.redhat.com/documentati...

All that been said, I think it should be a way to set those parameters on NetworkManager it self, but not sure. Try google.

edit flag offensive delete link more

Comments

Network Manager uses wpa_supplicant. So, it can be done using wpa_supplicant.conf. An implementation in the graphical interface of NetworkManager is still missing...

florian gravatar imageflorian ( 2016-05-24 12:53:09 -0600 )edit

Good to know.

aeperezt gravatar imageaeperezt ( 2016-05-24 16:42:36 -0600 )edit
2

answered 2016-05-24 12:23:10 -0600

florian gravatar image

updated 2016-05-24 12:24:54 -0600

Why don't you use wpa_supplicant to change your regulatory domain?

Add

COUNTRY=US

to /etc/wpa_supplicant/wpa_supplicant.conf

edit flag offensive delete link more

Comments

This is the correct answer.

aeperezt gravatar imageaeperezt ( 2016-05-24 12:50:12 -0600 )edit

Did not work.

matinlotfali gravatar imagematinlotfali ( 2016-05-25 05:16:13 -0600 )edit

dmesg | grep cfg80211 returns what when using (only) the method described here? (You would need to temporarily disable iw-set.service and reboot).

florian gravatar imageflorian ( 2016-05-25 09:55:06 -0600 )edit

Question Tools

2 followers

Stats

Asked: 2016-05-24 06:58:56 -0600

Seen: 990 times

Last updated: May 24 '16