/etc/config/wireless getting overwritten on reboot

I modified /etc/config/wireless but it is getting overwritten on reboot.

[brioja@Desktop knight]$ ssh root@192.168.8.1 cat /etc/config/wireless
root@192.168.8.1's password: 

config wifi-device 'radio0'
        option type 'mac80211'
        option path 'platform/soc/c000000.wifi'
        option band '5g'
        option htmode 'HE80'
        option country 'US'
        option disabled '0'
        option channel 'auto'
        option cell_density '0'
        option channels '36,40,44,48,149,153,157,161'

config wifi-device 'radio1'
        option type 'mac80211'
        option path 'platform/soc/c000000.wifi+1'
        option band '2g'
        option country 'US'
        option disabled '0'
        option channel 'auto'
        option htmode 'HE40'
        option cell_density '0'

config wifi-iface 'wifinet0'
        option ssid 'Home'
        option encryption 'psk2'
        option device 'radio0'
        option mode 'sta'
        option key '<Removed>'
        option network 'wwan2'

When I reboot, the wifinet0 is gone.

When you added these, did you do so by manually editing the conf or did you do it via UCI? If the latter I wonder if uci commit wireless didn’t do what it need to do.

I used Luci to do it.

After running uci commit wireless it doesn’t save the configuration either after rebooting.

It also looks like I only need to run this after running the uci commands. If the file is already modified, that command won’t do anything.

commit [<config>] Writes changes of the given configuration file, or if none is given, all configuration files, to the filesystem. All “uci set”, “uci add”, “uci rename” and “uci delete” commands are staged into a temporary location and written to flash at once with “uci commit”. This is not needed after editing configuration files with a text editor, but for scripts, GUIs and other programs working directly with UCI files.

https://openwrt.org/docs/guide-user/base-system/uci

I’ll take your word for it. I tend to stay away fr UCI as I’m just so conditioned to directly edit the conf on my various Linux boxes. You may want to do the same; opkg update && opkg install nano is a Helluva lot easier for editing if you’re not intending to spend a lot of time in sysadmin/programming work.

A good SSH client app will let you just paste your above conf directly into the file as needed. See the References & Resources of