Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ Standards-Version: 4.3.0

Package: raspberrypi-net-mods
Architecture: all
Depends: ${misc:Depends}, dhcpcd5 (>= 6.10.1-1+rpi2)
Depends: ${misc:Depends}, dhcpcd5 (>= 6.10.1-1+rpi2), dos2unix
Description: Network configuration for the Raspberry Pi UI
1 change: 1 addition & 0 deletions debian/raspberrypi-net-mods.install
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
etc
usr
4 changes: 2 additions & 2 deletions debian/raspberrypi-net-mods.service
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[Unit]
Description=Copy user wpa_supplicant.conf
ConditionPathExists=/boot/wpa_supplicant.conf
ConditionPathExistsGlob=/boot/wpa_supplicant.conf{,.txt}
Before=dhcpcd.service
After=systemd-rfkill.service

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mv /boot/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf
ExecStart=/usr/lib/raspberrypi-net-mods/mv-wpa.sh
ExecStartPost=/bin/chmod 600 /etc/wpa_supplicant/wpa_supplicant.conf
ExecStartPost=/usr/sbin/rfkill unblock wifi

Expand Down
10 changes: 10 additions & 0 deletions usr/lib/raspberrypi-net-mods/mv-wpa.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
if [ -f "/boot/wpa_supplicant.conf" ]; then
/bin/mv /boot/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant.conf
if [ -f "/boot/wpa_supplicant.conf.txt" ]; then
/bin/rm /boot/wpa_supplicant.conf.txt
fi
elif [ -f "/boot/wpa_supplicant.conf.txt" ]; then
/bin/mv /boot/wpa_supplicant.conf.txt /etc/wpa_supplicant/wpa_supplicant.conf
fi
dos2unix /etc/wpa_supplicant/wpa_supplicant.conf