mirror of
https://github.com/elisspace/rtinst.git
synced 2026-08-31 00:22:31 +00:00
Merge pull request #496 from V33m/patch-3
Fallback if lsb_release -si does not return Ubuntu, Debian or Raspbian
This commit is contained in:
@@ -202,8 +202,8 @@ fullrel=$(lsb_release -sd)
|
||||
osname=$(lsb_release -si)
|
||||
relno=$(lsb_release -sr | cut -d. -f1)
|
||||
|
||||
# Fallback if lsb_release -si returns nothing
|
||||
if [ "$osname" = "" ]; then
|
||||
# Fallback if lsb_release -si returns anything else than Ubuntu, Debian or Raspbian
|
||||
if [ ! "$osname" = "ubuntu" ] && [ ! "$osname" = "debian" ] && [ ! "$osname" = "raspbian" ]; then
|
||||
osname=$(grep -oP '(?<=^ID=).+' /etc/os-release | tr -d '"')
|
||||
osname=${osname^}
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user