Skip to content

Commit

Permalink
restore dhcpcd wpa conf setup
Browse files Browse the repository at this point in the history
  • Loading branch information
AlvinSchiller committed Mar 12, 2024
1 parent aeb33c4 commit 39e1b32
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
3 changes: 3 additions & 0 deletions misc/sampleconfigs/wpa_supplicant.conf.sample
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=%WIFIcountryCode%
9 changes: 9 additions & 0 deletions scripts/installscripts/install-jukebox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1195,6 +1195,15 @@ wifi_settings() {

if [[ $(is_dhcpcd_enabled) == true ]]; then
echo "... for dhcpcd"

local wpa_supplicant_conf="/etc/wpa_supplicant/wpa_supplicant.conf"
echo "Setting ${wpa_supplicant_conf}..."
# -rw-rw-r-- 1 root netdev 137 Jul 16 08:53 /etc/wpa_supplicant/wpa_supplicant.conf
sudo cp "${jukebox_dir}"/misc/sampleconfigs/wpa_supplicant.conf.sample "${wpa_supplicant_conf}"
sudo sed -i 's/%WIFIcountryCode%/'"$WIFIcountryCode"'/' "${wpa_supplicant_conf}"
sudo chown root:netdev "${wpa_supplicant_conf}"
sudo chmod 664 "${wpa_supplicant_conf}"

# add network with high priority
add_wireless_network "$WIFI_INTERFACE" "$WIFIssid" "$WIFIpass" 99

Expand Down

0 comments on commit 39e1b32

Please sign in to comment.