diff options
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." + + |