mirror of
https://github.com/brain-hackers/brain-config.git
synced 2024-12-22 20:20:06 +09:00
Use --follow-symlinks option in sed to keep symlink
This commit is contained in:
parent
44a2e6188c
commit
1cefeec830
@ -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