diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-02-28 12:09:43 -0800 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2008-02-28 12:09:43 -0800 |
commit | fb828c7cf89d964482f1812eec0acd33708b8e0c (patch) | |
tree | 6e305d38851c21f2faebc2f57e7bbda3ba2a003a /scripts/vyatta-show-dmi | |
parent | c9d801042d0749c921c7c0f3232df796034889e3 (diff) | |
download | vyatta-op-fb828c7cf89d964482f1812eec0acd33708b8e0c.tar.gz vyatta-op-fb828c7cf89d964482f1812eec0acd33708b8e0c.zip |
use sysfs rather dmidecode to look at hardware information
Bugfix: 2896
dmidecode requires sudo access, but using /sys/class/dmi/id/*
does not.
Diffstat (limited to 'scripts/vyatta-show-dmi')
-rwxr-xr-x | scripts/vyatta-show-dmi | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/scripts/vyatta-show-dmi b/scripts/vyatta-show-dmi new file mode 100755 index 0000000..38233e7 --- /dev/null +++ b/scripts/vyatta-show-dmi @@ -0,0 +1,15 @@ +#!/bin/bash + +if [ ! -d /sys/class/dmi ]; then + echo "DMI information not available" + exit 1 +fi + +for var in /sys/class/dmi/id/* +do + tag=$(basename $var) + if [ -f $var -a -r $var -a $tag != uevent -a $tag != modalias ]; then + echo -n "$tag: " + cat $var + fi +done |