View Single Post
  #2   (View Single Post)  
Old 22nd June 2022
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,985
Default

Quote:
Originally Posted by harrollld View Post
new questions, about wifi :

a1/ usually I connect by :
/sbin/ifconfig iwn0 nwid Essid wpakey keyyyyyy
/sbin/dhclient iwn0
then I launch the ovpn script

unfortunately, when I lid/suspend the laptop, I have to always relaunch the wifi script, to get connected again, so I have to.. login in root. Isnt it possible to do otherwise?
  1. You could configure your network using an /etc/hostname.iwn0 file, rather than a manually executed script. See the hostname.if(5) man page and the OpenBSD FAQ to get started.
  2. The dhclient(8) utility is still available for edge-cases when needed,, but was replaced at Release 6.9 by dhcpleased(8) and auto-configuration provisioning in ifconfig(8).
  3. If you still discover you need a root-executed script to run automatically after a resume from suspend or hibernate, see the FILES section of the apmd(8) man page.
Quote:
b2/ and another very specific one, on my linuxes ones, there are several profiles whom I guess debian tries everytimes by scanning wifi ssid, then connecting if it fits. would it be possible to do the same with openbsd, to scan each time internet is gone, for new available wifi and automatically connect to the known one, and maybe -you'll not appreciate that one-, to connect to a nearby opened network, as if I go to a public place or in an hotel, automatically connect to the opened network, to avoid do so by connecting in root? a bit like if I do it with a phone/linux, it doesnt asks for a passcode for each new wifi network
You can provision all of your desired WiFi networks in your /etc/hostname.iwn0 file -- see the join option in the 802.11 WIRELESS section of the ifconfig(8) man page.
Reply With Quote