Skip to content

Commit

Permalink
A bit more detailed message when starting the installer to share what…
Browse files Browse the repository at this point in the history
… version of OS we've detected.
  • Loading branch information
dmeltzer committed May 31, 2016
1 parent 5e03fe4 commit e5bd6a8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions snipeit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ if [ -f /etc/lsb-release ]; then
distro="$(lsb_release -s -i )"
version="$(lsb_release -s -r)"
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)"
#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,
Expand Down Expand Up @@ -75,15 +75,15 @@ echo ""
shopt -s nocasematch
case $distro in
*Ubuntu*)
echo " The installer has detected Ubuntu as the OS."
echo " The installer has detected Ubuntu version $version as the OS."
distro=ubuntu
;;
*Debian*)
echo " The installer has detected Debian as the OS."
echo " The installer has detected Debian version $version as the OS."
distro=debian
;;
*centos*|*redhat*)
echo " The installer has detected $distro as the OS."
echo " The installer has detected $distro version $version as the OS."
distro=centos
;;
*)
Expand Down

0 comments on commit e5bd6a8

Please sign in to comment.