profile.d: don't try to source non-existent os-release file
When /etc/os-release does not exist we directly try to source /usr/lib/os-release. This causes a 'No such file or directory' error when entering a toolbox which has neither. Fix this by checking for the presence of /usr/lib/os-release before sourcing it, just like what is done for /etc/os-release. Signed-off-by: Patrick Talbert <ptalbert@redhat.com>
This commit is contained in:
parent
640ca4cf3d
commit
4c9383ec63
|
|
@ -13,7 +13,7 @@ toolbox_welcome_stub="$toolbox_config/toolbox-welcome-shown"
|
|||
eval $(
|
||||
if [ -f /etc/os-release ]; then
|
||||
. /etc/os-release
|
||||
else
|
||||
elif [ -f /usr/lib/os-release ]; then
|
||||
. /usr/lib/os-release
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue