From f6db3ac3f13e5347f1f756b35e1345ea32fd95a5 Mon Sep 17 00:00:00 2001 From: "Scott E. Graves" Date: Fri, 19 Apr 2019 16:26:21 -0500 Subject: [PATCH] Fix CentOS 6 and CentOS 7 --- CHANGELOG.md | 2 ++ README.md | 2 ++ public/detect_linux.sh | 13 ++++++++++++- 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 75d8caa..b1a4059 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ * Linux distribution support * Arch Linux * Bodhi 5.0.0 + * CentOS 6 + * CentOS 7 * Debian 9 * Elementary OS 5.0 * Fedora 28 diff --git a/README.md b/README.md index 4dfa99d..809ae10 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,8 @@ Repertory allows you to mount Sia and/or SiaPrime blockchain storage solutions v * Linux 64-bit Distributions: * Arch Linux * Bodhi 5.0.0 + * CentOS 7 + * CentOS 6 * Debian 9 * Elementary OS 5.0 * Fedora 28 diff --git a/public/detect_linux.sh b/public/detect_linux.sh index e652e45..bf97782 100644 --- a/public/detect_linux.sh +++ b/public/detect_linux.sh @@ -8,7 +8,18 @@ function resetDistVer { DISTVER= } -if [ -f /etc/fedora-release ]; then +if [ -f /etc/centos-release ]; then + . /etc/os-release + if [ "$VERSION_ID" == "7" ]; then + DISTNAME=centos + DISTVER=7 + elif [ "$VERSION_ID" == "6" ]; then + DISTNAME=centos + DISTVER=6 + else + resetDistVer + fi +elif [ -f /etc/fedora-release ]; then . /etc/os-release if [ "$VERSION_ID" == "29" ]; then DISTNAME=fedora