guowenxue
2023-12-21 2c3d96c5c0e1a3bfd3f36b83471b771d9dae476c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
[Unit]
Description=Copy user wpa_supplicant.conf
ConditionPathExists=/run/media/boot-mmcblk0p1/wpa_supplicant.conf
After=getty.target
 
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=/bin/mkdir -p /etc/wpa_supplicant/
ExecStart=/bin/mv /run/media/boot-mmcblk0p1/wpa_supplicant.conf /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
ExecStartPost=/bin/chmod 600 /etc/wpa_supplicant/wpa_supplicant-wlan0.conf
ExecStartPost=/bin/sh -c "systemctl enable --now wpa_supplicant@wlan0"
 
[Install]
WantedBy=multi-user.target