mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-23 19:59:18 -08:00
A bit more detailed message when starting the installer to share what version of OS we've detected.
This commit is contained in:
parent
5e03fe40a7
commit
e5bd6a8a26
|
@ -46,7 +46,7 @@ if [ -f /etc/lsb-release ]; then
|
||||||
distro="$(lsb_release -s -i )"
|
distro="$(lsb_release -s -i )"
|
||||||
version="$(lsb_release -s -r)"
|
version="$(lsb_release -s -r)"
|
||||||
elif [ -f /etc/os-release ]; then
|
elif [ -f /etc/os-release ]; then
|
||||||
distro="$(. /etc/os-release && echo $ID $VERSION_ID)"
|
distro="$(. /etc/os-release && echo $ID)"
|
||||||
version="$(. /etc/os-release && echo $VERSION_ID)"
|
version="$(. /etc/os-release && echo $VERSION_ID)"
|
||||||
#Order is important here. If /etc/os-release and /etc/centos-release exist, we're on centos 7.
|
#Order is important here. If /etc/os-release and /etc/centos-release exist, we're on centos 7.
|
||||||
#If only /etc/centos-release exist, we're on centos6(or earlier). Centos-release is less parsable,
|
#If only /etc/centos-release exist, we're on centos6(or earlier). Centos-release is less parsable,
|
||||||
|
@ -75,15 +75,15 @@ echo ""
|
||||||
shopt -s nocasematch
|
shopt -s nocasematch
|
||||||
case $distro in
|
case $distro in
|
||||||
*Ubuntu*)
|
*Ubuntu*)
|
||||||
echo " The installer has detected Ubuntu as the OS."
|
echo " The installer has detected Ubuntu version $version as the OS."
|
||||||
distro=ubuntu
|
distro=ubuntu
|
||||||
;;
|
;;
|
||||||
*Debian*)
|
*Debian*)
|
||||||
echo " The installer has detected Debian as the OS."
|
echo " The installer has detected Debian version $version as the OS."
|
||||||
distro=debian
|
distro=debian
|
||||||
;;
|
;;
|
||||||
*centos*|*redhat*)
|
*centos*|*redhat*)
|
||||||
echo " The installer has detected $distro as the OS."
|
echo " The installer has detected $distro version $version as the OS."
|
||||||
distro=centos
|
distro=centos
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
|
Loading…
Reference in a new issue