[Dnsmasq-discuss] "bad command line options: illegal repeated flag"

RevRagnarok DNSMasq at RevRagnarok.com
Sun Jul 27 12:32:07 BST 2008


A friend of mine is having trouble with 2.45, previously had 2.27 installed.
When it launches from /etc/init.d/dnsmasq, it reports:
Shutting down dnsmasq:                                     [  OK  ]
Starting dnsmasq:
dnsmasq: bad command line options: illegal repeated flag
                                                         [FAILED]

The script with the options is below. Has anybody seen this error? Looking
at the script, I don't see any flag repeating.

  Aaron

% cat dnsmasq
#!/bin/sh
#
# Startup script for the DNS caching server
#
# chkconfig: 2345 99 01
# description: This script starts your DNS caching server
# processname: dnsmasq
# pidfile: /var/run/dnsmasq.pid

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

dnsmasq=/usr/local/sbin/dnsmasq
[ -f $dnsmasq ] || exit 0

# change this line if you want dnsmasq to serve an MX record for
# the host it is running on.
MAILHOSTNAME=""
# change this line if you want dns to get its upstream servers from
# somewhere other that /etc/resolv.conf
RESOLV_CONF=""
# change this if you want dnsmasq to cache any "hostname" or
"client-hostname" from
# a dhcpd's lease file
DHCP_LEASE="/var/lib/dhcp/dhcpd.leases"
DOMAIN_SUFFIX=`dnsdomainname`

OPTIONS="--domain=middleearth --expand-hosts"

if [ ! -z "${MAILHOSTNAME}" ]; then
  OPTIONS="$OPTIONS -m $MAILHOSTNAME"
fi

if [ ! -z "${RESOLV_CONF}" ]; then
  OPTIONS="$OPTIONS -r $RESOLV_CONF"
fi

if [ ! -z "${DHCP_LEASE}" ]; then
  OPTIONS="$OPTIONS -l $DHCP_LEASE"
fi

if [ ! -z "${DOMAIN_SUFFIX}" ]; then
  OPTIONS="$OPTIONS -s $DOMAIN_SUFFIX"
fi

RETVAL=0

# See how we were called.
case "$1" in
  start)
        echo -n "Starting dnsmasq: "
        daemon $dnsmasq $OPTIONS
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && touch /var/lock/subsys/dnsmasq
        ;;
  stop)
        if test "x`pidof dnsmasq`" != x; then
            echo -n "Shutting down dnsmasq: "
            killproc dnsmasq
        fi
        RETVAL=$?
        echo
        [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/dnsmasq
/var/run/dnsmasq.pid
        ;;
  status)
        status dnsmasq
        RETVAL=$?
        ;;
  restart|reload)
        $0 stop
        $0 start
        RETVAL=$?
        ;;
  condrestart)
            if test "x`/sbin/pidof dnsmasq`" != x; then
                $0 stop
                $0 start
                RETVAL=$?
            fi
            ;;
  *)
        echo "Usage: $0 {start|stop|restart|reload|condrestart|status}"
        exit 1
esac

exit $RETVAL
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/attachments/20080727/4b4cd277/attachment.htm


More information about the Dnsmasq-discuss mailing list