git://git.onelab.eu
/
myplc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
killproc no longer available in image
[myplc.git]
/
plc.d
/
dns
diff --git
a/plc.d/dns
b/plc.d/dns
index
377a269
..
b72b5a3
100755
(executable)
--- a/
plc.d/dns
+++ b/
plc.d/dns
@@
-1,6
+1,4
@@
#!/bin/bash
#!/bin/bash
-# $Id$
-# $URL$
#
# priority: 950
#
#
# priority: 950
#
@@
-41,7
+39,7
@@
case "$1" in
[ -n "$PLC_NET_DNS1" ] && echo "nameserver $PLC_NET_DNS1"
[ -n "$PLC_NET_DNS2" -a "$PLC_NET_DNS1" != "$PLC_NET_DNS2" ] && echo "nameserver $PLC_NET_DNS2"
) > $rfile
[ -n "$PLC_NET_DNS1" ] && echo "nameserver $PLC_NET_DNS1"
[ -n "$PLC_NET_DNS2" -a "$PLC_NET_DNS1" != "$PLC_NET_DNS2" ] && echo "nameserver $PLC_NET_DNS2"
) > $rfile
-
+
if [ $PLC_DNS_ENABLED -eq 1 ] ; then
ourfile=$(grep "$SIGNATURE" /etc/resolv.conf| wc -l)
if [ $ourfile -eq 0 ] ; then
if [ $PLC_DNS_ENABLED -eq 1 ] ; then
ourfile=$(grep "$SIGNATURE" /etc/resolv.conf| wc -l)
if [ $ourfile -eq 0 ] ; then
@@
-68,8
+66,8
@@
case "$1" in
dialog "$MESSAGE"
if [ -f "/etc/plc_resolv.conf" ] ; then
ourfile=$(grep "$SIGNATURE" /etc/plc_resolv.conf| wc -l)
dialog "$MESSAGE"
if [ -f "/etc/plc_resolv.conf" ] ; then
ourfile=$(grep "$SIGNATURE" /etc/plc_resolv.conf| wc -l)
- if [ $ourfile -ne 0 ] ; then
- dialog "WARNING: original /etc/resolv.conf was generated by etc/plc.d/dns"
+ if [ $ourfile -ne 0 ] ; then
+ dialog "WARNING: original /etc/resolv.conf was generated by etc/plc.d/dns"
fi
mv -f /etc/plc_resolv.conf /etc/resolv.conf
fi
fi
mv -f /etc/plc_resolv.conf /etc/resolv.conf
fi
@@
-90,7
+88,7
@@
case "$1" in
if [ $PLC_DNS_ENABLED -eq 1 ] ; then
MESSAGE="Stopping DNS server"
dialog "$MESSAGE"
if [ $PLC_DNS_ENABLED -eq 1 ] ; then
MESSAGE="Stopping DNS server"
dialog "$MESSAGE"
-
killproc
plc_dnsmasq
+
pkill -f
plc_dnsmasq
check
result ""
fi
check
result ""
fi