mirror of
https://github.com/brain-hackers/brain-config.git
synced 2024-12-22 20:20:06 +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 [ $? -eq 0 ];then
|
||||||
if [ -e /etc/wpa_supplicant/wpa_supplicant.conf ]; then
|
if [ -e /etc/wpa_supplicant/wpa_supplicant.conf ]; then
|
||||||
if grep -q "^country=" /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
|
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
|
fi
|
||||||
else
|
else
|
||||||
echo "country=$COUNTRY" > /etc/wpa_supplicant/wpa_supplicant.conf
|
echo "country=$COUNTRY" > /etc/wpa_supplicant/wpa_supplicant.conf
|
||||||
|
Loading…
Reference in New Issue
Block a user