Enhance-Add OS-CPU bit checking (#17)

encourage users to submit the output of lsb_release as an issue when
that test fails, this should allow contributors not in irc at the time
of the problem to see the information
Add CPU and OS bit checking which can be disabled with --no-cpu-check
This commit is contained in:
Mafoo
2016-06-11 15:52:38 +01:00
committed by FusionPBX
parent bded377c9a
commit 5482b1b932
2 changed files with 42 additions and 4 deletions

View File

@@ -1,4 +1,9 @@
#!/bin/sh
# Exit codes
# 1 general error
# 2 unsupported OS
# 3 unsupported CPU/OS bits
# check to confirm running as root.
if [ "$(id -u)" -ne "0" ]; then
echo "$(basename "$0") must be run as root";
@@ -9,7 +14,6 @@ echo
#Os/Distro Check
os_check=$(lsb_release -is)
check_major_release=$(lsb_release -rs | cut -d. -f1)
lsb_release -c | grep -i jessie > /dev/null
os_unsupported () {
echo " Your Operating System appears to be: "