2009/1/29 Victor Lowther <victor.lowt...@gmail.com>: > --- > 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 f5cc400..9a3097e 100644 > --- a/pm/pm-functions.in > +++ b/pm/pm-functions.in > @@ -79,7 +79,7 @@ done > > . "${PM_FUNCTIONS}" > > -if [ "$(id -u)" = "0" ] && command_exists hal-get-property; then > +if command_exists hal-get-property; then > export CHASSIS_TYPE="$(hal-get-property --udi > /org/freedesktop/Hal/devices/computer --key system.chassis.type)" > else > export CHASSIS_TYPE=Unknown
Hi, I think we should check the return code of hal-get-property and set CHASSIS_TYPE=Unknown if != 0 We should also avoid to print error messages of hal-get-property to stderr. See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=511466 for reference. Cheers, Michael -- Why is it that all of the instruments seeking intelligent life in the universe are pointed away from Earth? _______________________________________________ Pm-utils mailing list Pm-utils@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/pm-utils