Hi again!

* 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

 It has nothing to do with $PATH at all - just calling the script with a
relative path argument, not an absolute. Of course yours fails too - but
one doesn't want to put . into $PATH at all so if that would be the only
issue personally I'd ignore it.

 I checked other init.d scripts, some few do use "$0 start" in their
restart (most only use $0 in their usage message) - but none of them
do a cd anywhere so it doesn't come to this problem.

 Thanks,
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