mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2026-01-24 20:17:53 +01:00
etc/*resolv*.bash: partially fix if logic regarding Fedora Atomic
This commit is contained in:
parent
4acef51e43
commit
904a10b924
@ -5,7 +5,7 @@ set -x
|
|||||||
# well. I think it's even less likely I use this than the systemd-resolved
|
# well. I think it's even less likely I use this than the systemd-resolved
|
||||||
# one, but anyway
|
# one, but anyway
|
||||||
|
|
||||||
if [[ ! -d /sysroot/ostree ]]; then
|
if [[ -d /sysroot/ostree ]]; then
|
||||||
echo "Let's not mess up with Fedora Atomic. Try \$RES_OPTIONS instead? In profile.d?"
|
echo "Let's not mess up with Fedora Atomic. Try \$RES_OPTIONS instead? In profile.d?"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
if [[ ! -d /sysroot/ostree ]]; then
|
if [[ -d /sysroot/ostree ]]; then
|
||||||
echo "Let's not mess up with Fedora Atomic. Try \$RES_OPTIONS instead? In profile.d?"
|
echo "Let's not mess up with Fedora Atomic. Try \$RES_OPTIONS instead? In profile.d?"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -25,7 +25,7 @@ rm -v /etc/resolv.conf
|
|||||||
printf 'nameserver ::1\nnameserver 127.0.0.1\nnameserver 127.0.0.53\nsearch .\noptions timeout:1 attempts:5 rotate edns0 trust-ad\n' | tee -p /etc/resolv.conf
|
printf 'nameserver ::1\nnameserver 127.0.0.1\nnameserver 127.0.0.53\nsearch .\noptions timeout:1 attempts:5 rotate edns0 trust-ad\n' | tee -p /etc/resolv.conf
|
||||||
|
|
||||||
# Are we on Fedora Atomic?
|
# Are we on Fedora Atomic?
|
||||||
if [[ ! -d /sysroot/ostree ]]; then
|
if [[ -d /sysroot/ostree ]]; then
|
||||||
# Remove all other permissions than everyone reading resolv.conf
|
# Remove all other permissions than everyone reading resolv.conf
|
||||||
chmod -v a=r /etc/resolv.conf
|
chmod -v a=r /etc/resolv.conf
|
||||||
# Make resolv.conf immutable again so it's pretty sure nothing else edits it
|
# Make resolv.conf immutable again so it's pretty sure nothing else edits it
|
||||||
|
|||||||
@ -5,7 +5,7 @@ set -x
|
|||||||
# systemd-resolved as a DNS server. And then it also took parts of the
|
# systemd-resolved as a DNS server. And then it also took parts of the
|
||||||
# restore script.
|
# restore script.
|
||||||
|
|
||||||
if [[ ! -d /sysroot/ostree ]]; then
|
if [[ -d /sysroot/ostree ]]; then
|
||||||
echo "Let's not mess up with Fedora Atomic. Try \$RES_OPTIONS instead? In profile.d?"
|
echo "Let's not mess up with Fedora Atomic. Try \$RES_OPTIONS instead? In profile.d?"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
@ -37,7 +37,7 @@ rm -v /etc/resolv.conf
|
|||||||
printf 'nameserver 127.0.0.53\nnameserver 127.0.0.53\nnameserver 127.0.0.53\nsearch .\noptions timeout:1 attempts:5 rotate edns0 trust-ad\n' | tee -p /etc/resolv.conf
|
printf 'nameserver 127.0.0.53\nnameserver 127.0.0.53\nnameserver 127.0.0.53\nsearch .\noptions timeout:1 attempts:5 rotate edns0 trust-ad\n' | tee -p /etc/resolv.conf
|
||||||
|
|
||||||
# Are we on Fedora Atomic?
|
# Are we on Fedora Atomic?
|
||||||
if [[ ! -d /sysroot/ostree ]]; then
|
if [[ -d /sysroot/ostree ]]; then
|
||||||
# Remove all other permissions than everyone reading resolv.conf
|
# Remove all other permissions than everyone reading resolv.conf
|
||||||
chmod -v a=r /etc/resolv.conf
|
chmod -v a=r /etc/resolv.conf
|
||||||
# Make resolv.conf immutable again so it's pretty sure nothing else edits it
|
# Make resolv.conf immutable again so it's pretty sure nothing else edits it
|
||||||
|
|||||||
@ -4,7 +4,7 @@ set -x
|
|||||||
# I just had a feeling I should also have a quick script to quickly restore
|
# I just had a feeling I should also have a quick script to quickly restore
|
||||||
# systemd-resolved handling of the file.
|
# systemd-resolved handling of the file.
|
||||||
|
|
||||||
if [[ ! -d /sysroot/ostree ]]; then
|
if [[ -d /sysroot/ostree ]]; then
|
||||||
echo "Let's not mess up with Fedora Atomic. Try \$RES_OPTIONS instead? In profile.d?"
|
echo "Let's not mess up with Fedora Atomic. Try \$RES_OPTIONS instead? In profile.d?"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
set -x
|
set -x
|
||||||
|
|
||||||
if [[ ! -d /sysroot/ostree ]]; then
|
if [[ -d /sysroot/ostree ]]; then
|
||||||
echo "Let's not mess up with Fedora Atomic. Try \$RES_OPTIONS instead? In profile.d?"
|
echo "Let's not mess up with Fedora Atomic. Try \$RES_OPTIONS instead? In profile.d?"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user