1
0
Fork 0
mirror of https://github.com/SinTan1729/random.git synced 2024-12-25 12:58:35 -06:00

chg: Added a message explaining the need for sudo

This commit is contained in:
Sayantan Santra 2024-09-02 12:37:43 -05:00
parent 897464d8d1
commit 9437266fb2
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F

View file

@ -7,6 +7,7 @@
DNS=$(nmcli -f IP4.DNS dev show wlan0 | awk '{print $2}')
# Temporarily put the DNS resolver in place
echo "Need sudo permission to work with /etc/resolv.conf"
sudo cp /etc/resolv.conf /etc/resolv.conf.bk
echo "# Temporary resolv.conf generated by captive-portal-login.sh" | sudo tee /etc/resolv.conf
echo "nameserver $DNS" | sudo tee -a /etc/resolv.conf