Merge pull request #20 from jasaw/cp-boot-wpa-conf

Always copy /boot/wpa_supplicant.conf during startup
This commit is contained in:
Calin Crisan 2019-01-07 11:47:47 +02:00 committed by GitHub
commit 340fe4b1c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -22,10 +22,17 @@ fi
source $watch_conf
if [[ -f $boot_conf ]]; then
cp -f $boot_conf $conf
grep -E "/boot .*ro[\s,]" /proc/mounts
RO=$?
test $RO == 0 && mount -o remount,rw /boot
rm -f $boot_conf
test $RO == 0 && mount -o remount,ro /boot
fi
if ! [[ -f $conf ]]; then
if [[ -f $boot_conf ]]; then
cp $boot_conf $conf
elif [[ -f $sys_conf ]]; then
if [[ -f $sys_conf ]]; then
cp $sys_conf $conf
fi
fi