mirror of
https://github.com/iiab/iiab.git
synced 2025-03-09 15:40:17 +00:00
Merge branch 'master' into local_facts.fact-safer
This commit is contained in:
commit
0b49e48ec9
2 changed files with 10 additions and 6 deletions
|
@ -27,16 +27,16 @@ SYSTEMD_NETWORKD="none"
|
|||
# doesn't exist, or (2) iiab.env exists but fails to set STAGE=<something>
|
||||
source /etc/iiab/iiab.env || true # STAGE var auto-set, so no "if" required.
|
||||
|
||||
if tmp=$(grep ^ID= /etc/*elease); then
|
||||
# /etc/lsb-release could also be grep'd. But /etc/upstream-release/lsb-release
|
||||
# on Linux Mint 20 caused grep of /etc/*elease to fail (on directory not file)
|
||||
if tmp=$(grep ^ID= /etc/os-release); then
|
||||
OS=$(echo "$tmp" | cut -d= -f2)
|
||||
OS=${OS//\"/} # Remove all '"'
|
||||
fi
|
||||
if [ -f /etc/rpi-issue ]; then
|
||||
OS="raspbian"
|
||||
fi
|
||||
OS="raspbian" # For 64-bit Raspberry Pi OS which contains "ID=debian" as
|
||||
fi # of 2020: https://github.com/raspberrypi/Raspberry-Pi-OS-64bit/issues/6
|
||||
|
||||
# /etc/lsb-release could also be grep'd. But /etc/upstream-release/lsb-release
|
||||
# on Linux Mint 20 caused grep of /etc/*elease to fail (on directory not file)
|
||||
if tmp=$(grep ^VERSION_ID= /etc/os-release); then
|
||||
VERSION_ID=$(echo "$tmp" | cut -d= -f2)
|
||||
VERSION_ID=${VERSION_ID//\"/} # Remove all '"'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue