| |
@@ -17,7 +17,10 @@
|
| |
if rpm --quiet --query gnome-initial-setup || rpm --quiet --query pico-wizard; then
|
| |
(
|
| |
# Check the OS to ensure we're not RHEL-like
|
| |
- source /etc/os-release
|
| |
+ if ! source /etc/os-release; then
|
| |
+ source /usr/lib/os-release
|
| |
+ fi
|
| |
+
|
| |
if [[ "$ID" != "rhel" ]] && [[ "$ID_LIKE" != *"rhel"* ]]; then
|
| |
if [ ! -e "/run/ostree-booted" ] && [ -x "/usr/bin/pkcon" ]; then
|
| |
pkcon --noninteractive --autoremove remove ${ANACONDA_PACKAGES}
|
| |
It's not mandatory for
/etc/os-release
to be present. Theos-release(5)
manual says [1]:A valid
os-release(5)
file is not expected to have any commands in it. Hence, there's no chance of a non-zero exit code from the last command inside/etc/os-release
getting forwarded as the exit code of the attempt to source it [2], and getting misinterpreted as the file being absent. The/etc/os-release
file is owned byroot
. It's assumed that theroot
user knows what they are doing and has put in place a sane file.[1] https://www.freedesktop.org/software/systemd/man/os-release.html
[2] https://www.gnu.org/software/bash/manual/html_node/Bourne-Shell-Builtins.html