diff options
author | Victor Lowther <victor.lowther@gmail.com> | 2008-07-05 11:41:27 -0500 |
---|---|---|
committer | Victor Lowther <victor.lowther@gmail.com> | 2010-06-05 13:38:38 -0500 |
commit | a262ed4c23199e6c42c19dd6fea423d72b78a15a (patch) | |
tree | 6d18e6b108934d0b9ac61ae1344508295e41f658 | |
parent | 6ff56aa5ec0aa5756162e60b26fd3cbdfb8abcfa (diff) |
Make sure that we are root before trying to run dmidecode.
-rw-r--r-- | pm/pm-functions.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pm/pm-functions.in b/pm/pm-functions.in index 4ae6fc6..71dac93 100644 --- a/pm/pm-functions.in +++ b/pm/pm-functions.in @@ -85,7 +85,7 @@ done . "${PM_FUNCTIONS}" -if command_exists dmidecode; then +if [ "$(id -u)" = "0" ] && command_exists dmidecode; then export CHASSIS_TYPE="$(dmidecode -s chassis-type)" else export CHASSIS_TYPE=Unknown |