Commit 8c5ceff0 authored by Dave Morriss's avatar Dave Morriss
Browse files

Added OS information

parent e28cb48f
......@@ -15,9 +15,9 @@
# NOTES: ---
# AUTHOR: Dave Morriss (djm), Dave.Morriss@gmail.com
# Rob Evans (n1be) - added call to ifconfig
# VERSION: 0.0.9
# VERSION: 0.0.10
# CREATED: 2016-06-17 18:17:47
# REVISION: 2020-11-06 17:29:54
# REVISION: 2020-11-16 16:22:23
#
#===============================================================================
......@@ -83,6 +83,29 @@ settings_info () {
fi
}
#=== FUNCTION ================================================================
# NAME: os_info
# DESCRIPTION: Reports stuff about the OS version (and tries not to pollute
# the shell environment in doing so)
# PARAMETERS: None
# RETURNS: Nothing
#===============================================================================
os_info () {
local os_release='/etc/os-release'
echo "Operating system details:"
if [[ -e $os_release ]]; then
eval "local $(grep 'PRETTY_NAME' $os_release)"
printf '%-13s: %s\n' "Release" "$PRETTY_NAME"
else
printf '%-13s: %s\n' "Release" "unknown"
fi
printf '%-13s: %s\n' "Kernel" "$(uname -rv)"
printf '%-13s: %s\n' "Machine" "$(uname -m)"
}
#=== FUNCTION ================================================================
# NAME: cleanup_temp
# DESCRIPTION: Cleanup temporary files in case of a keyboard interrupt
......@@ -223,6 +246,12 @@ ENDPROG
#
awk -v "rev=$REV" -v "serial=$SER" -F" *\\t *" -f "$TMP2" "$TMP1"
#
# Report OS information
#
echo
os_info
#
# Report various settings and parameters
#
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment