balena-os / wifi-connect

Easy WiFi setup for Linux devices from your mobile phone or laptop
Apache License 2.0
1.28k stars 360 forks source link

PORTAL_SSID env to change ssid name #272

Open vietmq opened 5 years ago

vietmq commented 5 years ago

Hi, Actually, i want to change the ssid name for wifi-connect. I exported an environment variable PORTAL_SSID in /etc/profile i source the /etc/profile then start wifi-connect

but the name of ssid still default name. Please give me some of advise for my problem.

thanks

majorz commented 5 years ago

@vietmq I suspect the variable is not exported somehow. You may do echo $PORTAL_SSID before running wifi-connect to check whether it will be printed. If you cannot figure it out, please paste here as much details as possible - what OS type and version are you using, if you are using a start script, and so on.

vietmq commented 5 years ago

hi @majorz !

Here are my OS information : Raspbian Stretch Lite Minimal image based on Debian Stretch Version:November 2018 Release date:2018-11-13 Kernel version:4.14

i don't use start script, i start wif-connect by type : sudo wifi-connect

i export the PORTAL_SSID in /etc/profile

export PORTAL_SSID="myssidname" i reboot my pi then i check my env variable : echo $PORTAL_SSID, then i saw the result. but when start wifi-connect, the ssid name still default.

thanks Viet

ndmgrphc commented 3 years ago

Literally comedy https://serverfault.com/questions/413397/how-to-set-environment-variable-in-systemd-service

Someone in the pi community needs to step up and make this happen. It's time for env as a single source of truth that can be overridden by users. wifi-connect is a perfect use case for this. Yall talk a big "IOT" game yet this is a fail hard. Why can't I burn a SSID into my image? Systemd is OUT.