add amazonlinux compatibility in install-powershell.sh (#4360)

* Updated to support amazon linux (centos variant)

* Updated to support amazon linux (centos variant)

* Updated to support amazon linux (centos variant)
This commit is contained in:
Darwin 2017-08-01 12:47:01 -04:00 committed by Travis Plunk
parent 75de2e9f07
commit b7b3b69a74
2 changed files with 8 additions and 1 deletions

View file

@ -74,6 +74,11 @@ else
DIST=`cat /etc/redhat-release |sed s/\ release.*//`
PSUEDONAME=`cat /etc/redhat-release | sed s/.*\(// | sed s/\)//`
REV=`cat /etc/redhat-release | sed s/.*release\ // | sed s/\ .*//`
elif [ -f /etc/system-release ] ; then
DistroBasedOn='redhat'
DIST=`cat /etc/system-release |sed s/\ release.*//`
PSUEDONAME=`cat /etc/system-release | sed s/.*\(// | sed s/\)//`
REV=`cat /etc/system-release | sed s/.*release\ // | sed s/\ .*//`
elif [ -f /etc/SuSE-release ] ; then
DistroBasedOn='suse'
PSUEDONAME=`cat /etc/SuSE-release | tr "\n" ' '| sed s/VERSION.*//`

View file

@ -64,6 +64,8 @@ else
elif [ "${OS}" == "Linux" ] ; then
if [ -f /etc/redhat-release ] ; then
DistroBasedOn='redhat'
elif [ -f /etc/system-release ] ; then
DistroBasedOn='redhat'
elif [ -f /etc/SuSE-release ] ; then
DistroBasedOn='suse'
elif [ -f /etc/mandrake-release ] ; then
@ -94,7 +96,7 @@ if (( $EUID != 0 )); then
fi
#Check that sudo is available
if [[ "$SUDO" -eq "sudo" ]]; then
if [[ "$SUDO" -ne "" ]]; then
$SUDO -v
if [ $? -ne 0 ]; then