Hi,

it seems that $EUID is a bash only feature.

The attached patch uses $(uid -u) instead.

Please review.

Cheers,
Michael
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?
diff --git a/src/pm-action.in b/src/pm-action.in
index 82aa295..58f283e 100644
--- a/src/pm-action.in
+++ b/src/pm-action.in
@@ -40,7 +40,7 @@ help()
 	exit 0
 }
 
-if [ -n "$EUID" -a "$EUID" != "0" ]; then
+if [ "$(id -u)" != "0" ]; then
 	echo This utility may only be run by the root user. 1>&2
 	exit 1
 fi
_______________________________________________
Pm-utils mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pm-utils

Reply via email to