Wifi country setting gets resseted on reboot, how to make permanent?

Lemure

Member
Mar 7, 2021
26
3
23
75
I have a Proxmox node at home and I set the country code of a wireless card to my country using:
iw reg set XX
It works, when I test with:
iw reg get
the country has been changed to mine.

The problem is that on reboot of the proxmox node the country gets back to undefined.

How can I set the country code so it stays permanent? If iw is the way and it does not stay permanent, what would be the best way to run a small script setting the country on boot? It needs to be somewhere in the host, not in the container that will get the wifi card because iw only can set the country code in the host, not in the container, and ideally before the container gets started.
 
Since I did not get any suggestions on how to make it permanent, in case someone has a similar issue, I ended up "fixing" it by adding a crontab (crontab - e) line:

@reboot /usr/sbin/iw reg set XX

as suggested for other issues on how to get some command run on boot in the forum.

It gets the job done.