Page 1 of 1

[Solved]iw Command Permanent

Posted: Thu Aug 30, 2018 5:12 pm
by JayBird707
I need to use wowaln with a NUC I'm setting up for my terrific wife. I need to execute the following command to get everything to work.

Code: Select all

sudo iw phy0 wowlan enable
The setting is not persistent and if the unit reboots for some reason I don't want her to know the sudo password.
Can someone tell me how to make the command persistent.
Thanks!

Re: iw Command Permanent

Posted: Thu Aug 30, 2018 5:29 pm
by xenopeek
You could try adding the line iw phy0 wowlan enable to the end of the file /etc/rc.local. That would run the command before login, so once the login screen is up (typically when network is also available).

If you don't have a file /etc/rc.local then create it, set execute permission on it and edit it to add the above line to it. If you're unsure just do the following to ensure the file exists and is executable before opening the editor (showing the blank new file or contents of previously existing file) so you can add the above line to the end of it.

Code: Select all

sudo touch /etc/rc.local
sudo chmod +x /etc/rc.local
xed admin:///etc/rc.local
(If you're using a version older than Linux Mint 19, replace the last command with gksudo xed /etc/rc.local or for very old versions with gksudo pluma /etc/rc.local)

Re: iw Command Permanent

Posted: Fri Aug 31, 2018 7:31 pm
by JayBird707
It will not work on a boot. If I run it from the terminal sudo /etc/rc.local it works. I put a sleep 10 as the first command and that did not help.

Re: iw Command Permanent

Posted: Sat Sep 01, 2018 11:37 am
by JayBird707
Xenopeek,
I am so sorry. Your solution of using rc.local works. I am too embarrassed to even tell you why I had some issues. Thank you for your help.
Jeff

Re: [Solved]iw Command Permanent

Posted: Sat Sep 01, 2018 12:18 pm
by xenopeek
No problem. Glad it did the trick!