mirror of
https://github.com/rocky-linux/rocky-tools.git
synced 2024-12-28 20:50:54 +00:00
os-release should be run in a subshell.
os-release should be run in a subshell to avoid the settings corrupting the main script.
This commit is contained in:
parent
7f08a2b696
commit
fdadcac23d
1 changed files with 2 additions and 2 deletions
|
@ -48,13 +48,13 @@ logmessage(){
|
|||
}
|
||||
|
||||
# This just grabs a field from os-release and returns it.
|
||||
os-release () {
|
||||
os-release () (
|
||||
. /etc/os-release
|
||||
if ! [[ ${!1} ]]; then
|
||||
return 1
|
||||
fi
|
||||
printf '%s\n' "${!1}"
|
||||
}
|
||||
)
|
||||
|
||||
# All of the binaries used by this script are available in a EL8 minimal install
|
||||
# and are in /bin, so we should not encounter a system where the script doesn't
|
||||
|
|
Loading…
Reference in a new issue