linux script to report if this machine supports 64 bit computing (via long mode
authorChris Koeritz <fred@gruntose.com>
Mon, 18 Feb 2013 00:41:14 +0000 (19:41 -0500)
committerChris Koeritz <fred@gruntose.com>
Mon, 18 Feb 2013 00:41:14 +0000 (19:41 -0500)
check on cpuinfo).

scripts/system/check_64bit.sh [new file with mode: 0644]

diff --git a/scripts/system/check_64bit.sh b/scripts/system/check_64bit.sh
new file mode 100644 (file)
index 0000000..0943b5f
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# just tests whether a linux box can handle 64-bit operating systems.
+
+longmode_check="$(grep " lm " /proc/cpuinfo |head -n 1)"
+
+if [ -z "$longmode_check" ]; then
+  echo "CPU does not seem to support 64 bit long mode."
+else
+  echo "CPU can support 64 bit long mode."
+fi
+