File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -152,7 +152,8 @@ create_hotspot() {
152152 fi
153153
154154 # Get WiFi device
155- local DEVICE=$( get_wifi_device)
155+ local DEVICE
156+ DEVICE=$( get_wifi_device)
156157 if [ -z " $DEVICE " ]; then
157158 print_error " No wireless device found"
158159 exit 1
@@ -222,7 +223,8 @@ stop_hotspot() {
222223}
223224
224225show_status () {
225- local DEVICE=$( get_wifi_device)
226+ local DEVICE
227+ DEVICE=$( get_wifi_device)
226228
227229 echo " "
228230 print_info " === Hotspot Status ==="
@@ -231,8 +233,10 @@ show_status() {
231233 print_success " Status: ACTIVE"
232234
233235 # Get connection details
234- local SSID=$( nmcli -t -f 802-11-wireless.ssid connection show " $CONNECTION_NAME " | cut -d: -f2)
235- local BAND=$( nmcli -t -f 802-11-wireless.band connection show " $CONNECTION_NAME " | cut -d: -f2)
236+ local SSID
237+ local BAND
238+ SSID=$( nmcli -t -f 802-11-wireless.ssid connection show " $CONNECTION_NAME " | cut -d: -f2)
239+ BAND=$( nmcli -t -f 802-11-wireless.band connection show " $CONNECTION_NAME " | cut -d: -f2)
236240
237241 echo " SSID: $SSID "
238242 echo " Band: $BAND ($( [ " $BAND " = " bg" ] && echo " 2.4GHz" || echo " 5GHz" ) )"
You can’t perform that action at this time.
0 commit comments