Skip to content

Commit

Permalink
updated rrs_discover_distro
Browse files Browse the repository at this point in the history
  • Loading branch information
mdeguzis committed Oct 31, 2014
1 parent 59b81d0 commit d806d4d
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions scriptmodules/setup.shinc
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,32 @@ function rrs_post_install()

function rrs_discover_distro()
{

# Users that may run this on a non-Linux OS:
UNAME=`uname`
if [ "$UNAME" != "Linux" ]; then
echo "Error: Unsupported Operating System"
exit 1
fi

# OS Distro
OS_ID_STRING=$(lsb_release -a 2>/dev/null|grep "Distributor ID")
OS_TYPE=$(echo $OS_ID_STRING|cut -f 3 -d ' ')

# Release
OS_RELEASE_STRING=$(lsb_release -a 2>/dev/null|grep "Release")
OS_RELEASE=$(echo $OS_RELEASE_STRING | sed s/' '//g | cut -f 2 -d ':')

# Arch
case $(uname -m) in
*64)
echo "64-bit"
;;
*)
echo "32-bit"
;;
esac

}

function rrs_source_syscalls()
Expand Down

0 comments on commit d806d4d

Please sign in to comment.