[squeak-dev] [almost fixed] Re: Using squeak rfb/vnc server with unix server stuff

Chris Muller ma.chris.m at gmail.com
Mon Sep 16 19:42:01 UTC 2019


On Sun, Sep 15, 2019 at 5:17 AM K K Subbu <kksubbu.ml at gmail.com> wrote:

> On 13/09/19 2:04 AM, tim Rowledge wrote:
> > WHOAMI=`whoami`
> >
> > echo creating rotated log/main directory...
> > mkdir -p log/main
> > chmod o-rwx log/main
> >
> > echo --- generate log/run script
> > echo ''#!/bin/bash
> > exec 2>&1
> > exec setuidgid ''$WHOAMI'' multilog t ./main'' > $PWD/log/run
> > sudo chown -R $WHOAMI log
>
> WHOAMI is local to the script, so it won't be set in the run script
>

Correct.  It's for the installation script only.


> leading to multilog being treated as a uid argument.


My undestanding is that Tim's fix, to put double-quotations around it, will
cause "$WHOAMI" to resolve during the run of this installation script,
hardcoding the current user as the uid argument.


>
> You could change this to the more readable:
>
> echo -- generate log/run script
> cat >$PWD/log/run <<EOF
> #!/bin/bash
> exec 2>&1
> exec setuidgid $WHOAMI multilog t ./main
> EOF
> sudo chown -R $WHOAMI log
>

Thanks!

  - Chris


>
> HTH .. Subbu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190916/98095569/attachment.html>


More information about the Squeak-dev mailing list