[PATCH UPDATE] tools/wineshelllink *METHOD 4*

Steve Langasek vorlon at dodds.net
Thu Apr 25 16:39:14 CDT 2002


On Thu, Apr 25, 2002 at 05:21:17PM -0400, Vincent Béron wrote:
> Paul Millar a écrit :
> > 
> > On Thu, 25 Apr 2002, Speeddymon wrote:
> > > +  if [ -d "/usr/lib/menu" -a "$mode" = "menu" -a ! `whoami` = "root" ]
> > > +  then
> > [...]
> > > +  elif [ `whoami` = "root" ]
> > > +  then
> > > +    mdk_entry >> "/usr/lib/menu/wine"
> > > +  fi
> > 
> > Sorry, I haven't been following this but isn't the elif condition
> > redundant?
> > 
> > Also, AFAIK although its unusual, there's no reason an account name cannot
> > have a space in it, so
> >  `whoami`  should be  "`whoami`"
> > 
> > [spent too much time debugging strings in scripts ;^]

> Shouldn't we check for uid == 0? The common name for that uid is "root",
> but I don't think anything prevents you from changing that name to
> say... administrator, or god. But that check is easier to do with a C
> program than shell...

id -u

Steve Langasek
postmodern programmer



More information about the wine-devel mailing list