diff options
| author | rod.smith <rod.smith@canonical.com> | 2014-07-16 09:06:42 -0400 |
|---|---|---|
| committer | rod.smith <rod.smith@canonical.com> | 2014-07-16 09:06:42 -0400 |
| commit | 85f7605ed0f38ae46ee59fb8ffd48a270f68c508 (patch) | |
| tree | 8afe8ef6c24fa1d3b5203e06d533f71f76fad46f /bin | |
| parent | 2a2443867dec052cd44d9c1c2c9114ed30ec419c (diff) | |
Added script to place manufacturer and model information (miscellanea/get_make_and_model) in output
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/get_make_and_model | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/bin/get_make_and_model b/bin/get_make_and_model new file mode 100755 index 0000000..e618807 --- /dev/null +++ b/bin/get_make_and_model @@ -0,0 +1,19 @@ +#!/usr/bin/env python3 + +import sys +import subprocess +from subprocess import call + + +def main(args): + + print ("Manufacturer: ", end="", flush=True) + call(["dmidecode", "-s", "system-manufacturer"]) + print ("Model: ", end="", flush=True) + call(["dmidecode", "-s", "system-product-name"]) + print ("Version: ", end="", flush=True) + call(["dmidecode", "-s", "system-version"]) + return 0 + +if __name__ == "__main__": + sys.exit(main(sys.argv[1:])) |
