Skip to content

Support wpa_supplicant.conf.txt, convert DOS line endings to UNIX to keep wpa_supplicant happy #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
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=ExecStart=/bin/sh -c "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"
ExecStartPost=/bin/chmod 600 /etc/wpa_supplicant/wpa_supplicant.conf
ExecStartPost=/usr/sbin/rfkill unblock wifi

Expand Down