[Dnsmasq-discuss] dhcp-script on dnsmasq

Helmut Hullen Hullen at t-online.de
Fri Apr 15 17:32:00 BST 2011


Hallo, Michael,

Du meintest am 15.04.11:

> 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

"/tmp" is no good choice for a program which has to be executed in this  
case from "dnsmasq".

I prefer "/root/bin" for those scripts because managing "dnsmasq" is a  
pure "root" job; maybe FHS or other rule works propose other  
directories.

What's the contents of your script? Just for testing you may use

#! /bin/bash
# just for testing
Log=/var/log/dnsmasqscript.log
date >> $Log
echo "Param1 = $1" >> $Log
echo "Param2 = $2" >> $Log
echo "Param3 = $3" >> $Log
echo "Param4 = $4" >> $Log
#


Script rights:
        root:root
        700

Viele Gruesse!
Helmut



More information about the Dnsmasq-discuss mailing list