[Dnsmasq-discuss] dhcp-script on dnsmasq

Michael P. McDonnell bzaks1424 at gmail.com
Fri Apr 15 17:27:55 BST 2011


You know what I found - it was actually the line endings:
I noticed it was in DOS format when I was playing with it on VI, and so I
ran dos2unix and magically it was fine!

On Fri, Apr 15, 2011 at 11:24, Paul Smith <paul at mad-scientist.net> wrote:

> On Fri, 2011-04-15 at 11:12 -0500, Michael P. McDonnell wrote:
> > Is there a secret chroot or something going on that I don't know
> > about? I'm running dnsmasq 2.57 and whenever I try to run my
> > dhcp-script it bombs out saying "failed to execute /tmp/post-lease.sh:
> > No such file or directory"
> > However, if I say "ls -l /tmp/post-lease.sh" its most definitely
> > exists and its chmodded 777 just to be safe.
> >
> > My relevant entry on my dnsmasq.conf is
> >
> > dhcp-script=/tmp/post-lease.sh
> >
> > Am I missing something important?
>
> Just to ask the stupid question: the first line of your post-lease.sh
> file uses #! and references an existing, executable file, right?
>
> If the kernel can't exec the interpreter on your sh-bang line you get
> errors like this one.
>
>
> Or asked another way, can you run "/tmp/post-lease.sh" from the command
> line directly?
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20110415/1a425a5f/attachment.htm 


More information about the Dnsmasq-discuss mailing list