From b80714540ae1a7f0c284a6be57cef32472286b44 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 27 Oct 2020 14:03:55 -0400 Subject: [PATCH] Fix in scripts/local_facts.fact for Mint --- scripts/local_facts.fact | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/local_facts.fact b/scripts/local_facts.fact index 0f84c1232..85df68811 100755 --- a/scripts/local_facts.fact +++ b/scripts/local_facts.fact @@ -27,7 +27,9 @@ SYSTEMD_NETWORKD="none" # doesn't exist, or (2) iiab.env exists but fails to set STAGE= 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 @@ -35,8 +37,6 @@ if [ -f /etc/rpi-issue ]; then OS="raspbian" fi -# /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 '"'