Hi!

 *ping*, anyone still around? :)

* Gerfried Fuchs <rho...@deb.at> [2009-03-06 09:48:00 CET]:
> * Christoph Haas <em...@christoph-haas.de> [2009-03-05 23:58:34 CET]:
> > On Donnerstag, 5. März 2009, Gerfried Fuchs wrote:
> > >  The /etc/init.d/pnds script does the following:
> > >
> > > #v+
> > > cd $SOCKETPATH
> > >
> > > [...]
> > >
> > >                 $0 start
> > > #v-
> > >
> > >  This obviously fails when one doesn't call the script with an absolute
> > > path.
> > 
> > Perhaps I'm just stupid but it's not obvious to me. Could you elaborate on 
> > this? Do you mean you do "export PATH=.:$PATH" while being root and 
> > then "cd /etc/init.d ; pdns start"? Why is $0 not safe? Thanks in advance.
> 
>  cd /etc/init.d; sudo ./pdns restart  # and watch the messages

 One solution would be to use something like "initscript=$(pwd)/$(basename $i)"
at the top and go with $initscript for the rest of the script. Another
solution would be to store pwd=$PWD before doing the cd and cd back
before doing the call to $0.

 ... or investigate why it at all needs to be cd'ed to /var/run and fix
that problem.

 Just some thoughts,
Rhonda



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to