[Pm-utils] EUID bash only feature?
Victor Lowther
victor.lowther at gmail.com
Fri Mar 7 18:01:11 PST 2008
On Sat, Mar 08, 2008 at 02:49:31AM +0100, Michael Biebl wrote:
> Hi,
>
> it seems that $EUID is a bash only feature.
>
> The attached patch uses $(uid -u) instead.
Well, I do not see a command named uid. You obviously meant id.
id is provided by coreutils, so we whousl be fairly safe there.
> 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
ACK
--
Victor Lowther
Ubuntu Certified Professional
More information about the Pm-utils
mailing list