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
1 changed files with 1 additions and 0 deletions

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