mirror of
https://github.com/brain-hackers/brain-config.git
synced 2024-12-22 12:10:07 +09:00
Merge pull request #50 from kennethjiang/master
Use --follow-symlinks option in sed to keep symlink
This commit is contained in:
commit
bb0d5d44c3
@ -351,9 +351,9 @@ do_wifi_country() {
|
||||
if [ $? -eq 0 ];then
|
||||
if [ -e /etc/wpa_supplicant/wpa_supplicant.conf ]; then
|
||||
if grep -q "^country=" /etc/wpa_supplicant/wpa_supplicant.conf ; then
|
||||
sed -i "s/^country=.*/country=$COUNTRY/g" /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
sed -i --follow-symlinks "s/^country=.*/country=$COUNTRY/g" /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
else
|
||||
sed -i "1i country=$COUNTRY" /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
sed -i --follow-symlinks "1i country=$COUNTRY" /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
fi
|
||||
else
|
||||
echo "country=$COUNTRY" > /etc/wpa_supplicant/wpa_supplicant.conf
|
||||
|
Loading…
Reference in New Issue
Block a user