Check of the dnsmasq pidfile has any data
authorRoy Marples <roy@marples.name>
Sat, 10 Nov 2007 23:12:26 +0000 (23:12 +0000)
committerRoy Marples <roy@marples.name>
Sat, 10 Nov 2007 23:12:26 +0000 (23:12 +0000)
dnsmasq

diff --git a/dnsmasq b/dnsmasq
index a0f852f430c04a07f0ea99060f6188a21e289f41..e2fcecdfcbd70dfb31baceb37589f14dcef5456a 100755 (executable)
--- a/dnsmasq
+++ b/dnsmasq
@@ -51,7 +51,7 @@
 VARS="$(resolvconf -v)"
 eval "${VARS}"
 
 VARS="$(resolvconf -v)"
 eval "${VARS}"
 
-PREFIX=
+PREFIX=/
 DNSMASQRESOLV="${PREFIX}/etc/dnsmasq-resolv.conf"
 DNSMASQCONF="${PREFIX}/etc/dnsmasq-resolvconf.conf"
 
 DNSMASQRESOLV="${PREFIX}/etc/dnsmasq-resolv.conf"
 DNSMASQCONF="${PREFIX}/etc/dnsmasq-resolvconf.conf"
 
@@ -64,7 +64,7 @@ NEWRESOLV="${NEWCONF}"
 # so we need to validate a few things first.
 # Check for DBus support in the binary
 DBUS=no
 # so we need to validate a few things first.
 # Check for DBus support in the binary
 DBUS=no
-if [ -s "${PREFIX}"/var/run/dbus.pid -a "${PREFIX}"/var/run/dnsmasq.pid ]; then
+if [ -s "${PREFIX}"/var/run/dbus.pid -a -s "${PREFIX}"/var/run/dnsmasq.pid ]; then
        if dnsmasq --version 2>/dev/null | \
                grep -q "^Compile time options.*[[:space:]]DBus[[:space:]]" \
                ; then
        if dnsmasq --version 2>/dev/null | \
                grep -q "^Compile time options.*[[:space:]]DBus[[:space:]]" \
                ; then