diff options
author | Jonathan Bauer | 2013-03-11 12:40:21 +0100 |
---|---|---|
committer | Jonathan Bauer | 2013-03-11 12:40:21 +0100 |
commit | 11ad9ecced813ea068db1a8b8c48b0de25b47e96 (patch) | |
tree | 4cac518d0c76599ae417b0505fced8ca9e218c65 /helper/system.inc | |
parent | new function to list libc and ld-linux path, updated in setup_tools (diff) | |
download | tm-scripts-11ad9ecced813ea068db1a8b8c48b0de25b47e96.tar.gz tm-scripts-11ad9ecced813ea068db1a8b8c48b0de25b47e96.tar.xz tm-scripts-11ad9ecced813ea068db1a8b8c48b0de25b47e96.zip |
new system.inc helper to fetch common system information
Diffstat (limited to 'helper/system.inc')
-rw-r--r-- | helper/system.inc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/helper/system.inc b/helper/system.inc new file mode 100644 index 00000000..b7d13416 --- /dev/null +++ b/helper/system.inc @@ -0,0 +1,14 @@ +# Helper to determine various system information + +# +# determine architecture triplet from the path of libc needed by the executing shell. +ARCH_TRIPLET=$(ldd $SHELL|grep libc | awk -F "/" '{print $3}') +[ ! -z $ARCH_TRIPLET ] && pinfo "Arch triplet of this machine: $ARCH_TRIPLET" \ + || pwarning "Could not determine arch triplet." + +# determine kernel version +KERNEL_VERSION=$(uname -r) +[ ! -z $KERNEL_VERSION ] && pinfo "Kernel version: $KERNEL_VERSION" \ + || pwarning "Could not determine kernel version." + + |