workaround resolv.conf unlinkat by throwing res-options to profile.d

This commit is contained in:
Aminda Suomalainen 2025-05-17 09:50:04 +03:00
parent e2de113a47
commit a405f918c7
Signed by: Mikaela
GPG Key ID: 99392F62BAE30723
6 changed files with 27 additions and 0 deletions

View File

@ -5,6 +5,11 @@ set -x
# well. I think it's even less likely I use this than the systemd-resolved
# one, but anyway
if [[ ! -d /sysroot/ostree ]]; then
echo "Let's not mess up with Fedora Atomic. Try \$RES_OPTIONS instead? In profile.d?"
exit 1
fi
# I know there are old versions that used something else, but I don't remember
# that name and they are ancient.
if ! hash nmcli 2> /dev/null; then

View File

@ -0,0 +1,2 @@
# This is equivalent to options in /etc/resolv.conf
export RES_OPTIONS="timeout:1 attempts:5 rotate edns0 trust-ad"

View File

@ -1,6 +1,11 @@
#!/usr/bin/env bash
set -x
if [[ ! -d /sysroot/ostree ]]; then
echo "Let's not mess up with Fedora Atomic. Try \$RES_OPTIONS instead? In profile.d?"
exit 1
fi
# Require root or exit
if [ "$(id -u)" != "0" ]; then
echo "This script requires root." 1>&2

View File

@ -5,6 +5,11 @@ set -x
# systemd-resolved as a DNS server. And then it also took parts of the
# restore script.
if [[ ! -d /sysroot/ostree ]]; then
echo "Let's not mess up with Fedora Atomic. Try \$RES_OPTIONS instead? In profile.d?"
exit 1
fi
# I know there are old versions that used something else, but I don't remember
# that name and they are ancient.
if ! hash resolvectl 2> /dev/null; then

View File

@ -4,6 +4,11 @@ set -x
# I just had a feeling I should also have a quick script to quickly restore
# systemd-resolved handling of the file.
if [[ ! -d /sysroot/ostree ]]; then
echo "Let's not mess up with Fedora Atomic. Try \$RES_OPTIONS instead? In profile.d?"
exit 1
fi
# I know there are old versions that used something else, but I don't remember
# that name and they are ancient.
if ! hash resolvectl 2> /dev/null; then

View File

@ -1,6 +1,11 @@
#!/usr/bin/env bash
set -x
if [[ ! -d /sysroot/ostree ]]; then
echo "Let's not mess up with Fedora Atomic. Try \$RES_OPTIONS instead? In profile.d?"
exit 1
fi
# Require root or exit
if [ "$(id -u)" != "0" ]; then
echo "This script requires root. (And the 3 nameserver IPs as arguments)" 1>&2