|
@ -354,25 +354,25 @@ function miaou_resolver() { |
|
|
else |
|
|
else |
|
|
echo "miaou-resolver in NetworkManager dispatcher already initialized!" |
|
|
echo "miaou-resolver in NetworkManager dispatcher already initialized!" |
|
|
fi |
|
|
fi |
|
|
else |
|
|
|
|
|
if sudo systemctl is-enabled systemd-resolved.service --quiet; then |
|
|
|
|
|
echo -n "disabling systemd-resolved..." |
|
|
|
|
|
sudo systemctl stop systemd-resolved.service --quiet |
|
|
|
|
|
sudo systemctl disable systemd-resolved.service --quiet |
|
|
|
|
|
PREFIX="" echoinfo DONE |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
if sudo systemctl is-enabled systemd-resolved.service --quiet; then |
|
|
|
|
|
echo -n "disabling systemd-resolved..." |
|
|
|
|
|
sudo systemctl stop systemd-resolved.service --quiet |
|
|
|
|
|
sudo systemctl disable systemd-resolved.service --quiet |
|
|
|
|
|
PREFIX="" echoinfo DONE |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
if ! grep -q "nameserver $bridge" /etc/resolv.conf; then |
|
|
|
|
|
echo -n "customize resolv.conf from scratch with bridge=<$bridge>, gatewary=<$gateway> ..." |
|
|
|
|
|
sudo tee /etc/resolv.conf &>/dev/null <<EOF |
|
|
|
|
|
|
|
|
if ! grep -q "nameserver $bridge" /etc/resolv.conf; then |
|
|
|
|
|
echo -n "customize resolv.conf from scratch with bridge=<$bridge>, gatewary=<$gateway> ..." |
|
|
|
|
|
sudo tee /etc/resolv.conf &>/dev/null <<EOF |
|
|
# generated by miaou |
|
|
# generated by miaou |
|
|
nameserver $bridge # LXD bridge |
|
|
nameserver $bridge # LXD bridge |
|
|
nameserver $gateway # gateway |
|
|
nameserver $gateway # gateway |
|
|
EOF |
|
|
EOF |
|
|
PREFIX="" echoinfo DONE |
|
|
|
|
|
else |
|
|
|
|
|
echo "customize resolv.conf already already defined!" |
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
PREFIX="" echoinfo DONE |
|
|
|
|
|
else |
|
|
|
|
|
echo "customize resolv.conf already already defined!" |
|
|
fi |
|
|
fi |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|