Browse Source

chattr resolv.conf

main
pvincent 3 months ago
parent
commit
b19748615d
  1. 2
      lib/install.sh

2
lib/install.sh

@ -397,12 +397,14 @@ function miaou_resolver() {
if ! grep -q "nameserver $bridge" /etc/resolv.conf; then if ! grep -q "nameserver $bridge" /etc/resolv.conf; then
echo -n "customize resolv.conf from scratch with bridge=<$bridge>, resolver=<$resolver> ..." echo -n "customize resolv.conf from scratch with bridge=<$bridge>, resolver=<$resolver> ..."
sudo chattr -i /etc/resolv.conf
sudo tee /etc/resolv.conf &>/dev/null <<EOF sudo tee /etc/resolv.conf &>/dev/null <<EOF
# generated by miaou # generated by miaou
nameserver $bridge # LXD bridge nameserver $bridge # LXD bridge
nameserver $resolver # resolver nameserver $resolver # resolver
EOF EOF
PREFIX="" echoinfo DONE PREFIX="" echoinfo DONE
sudo chattr +i /etc/resolv.conf
else else
echo "customize resolv.conf already defined!" echo "customize resolv.conf already defined!"
fi fi

Loading…
Cancel
Save