From cab600a640e2d233b0b9be40be8d8ae90528a57d Mon Sep 17 00:00:00 2001 From: AOrps Date: Thu, 20 Apr 2023 15:54:56 -0400 Subject: [PATCH] Checking /etc/lsb-release file status --- .gitignore | 2 ++ acmlib.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..126bc53 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +# Files +*~ \ No newline at end of file diff --git a/acmlib.sh b/acmlib.sh index 05dc0bc..0c619c3 100644 --- a/acmlib.sh +++ b/acmlib.sh @@ -295,7 +295,7 @@ check_os_is_centos () { } check_os_is_ubuntu () { - grep -iq '^DISTRIB_ID *= *Ubuntu' /etc/lsb-release + [ -s /etc/lsb-release ] && grep -iq '^DISTRIB_ID *= *Ubuntu' /etc/lsb-release } require_supported_os () {