mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2025-06-14 11:07:20 +02:00
workaround resolv.conf unlinkat by throwing res-options to profile.d
This commit is contained in:
parent
e2de113a47
commit
a405f918c7
@ -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
|
||||
|
2
etc/profile.d/99-resolv.conf-options.sh
Normal file
2
etc/profile.d/99-resolv.conf-options.sh
Normal 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"
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user