X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plc.d%2Fdns;h=b72b5a34c0fe12214b556839813d7cee5c4dff5f;hb=4ec856430b9b9a8f16ea2a5d0b11e951cfb1ed1c;hp=377a26966459dc9035dfb7ff4d7f9443269ee04f;hpb=96b13f97bb0887cb858151265208f393c5fc495a;p=myplc.git diff --git a/plc.d/dns b/plc.d/dns index 377a269..b72b5a3 100755 --- a/plc.d/dns +++ b/plc.d/dns @@ -1,6 +1,4 @@ #!/bin/bash -# $Id$ -# $URL$ # # 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 - + 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) - 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 @@ -90,7 +88,7 @@ case "$1" in if [ $PLC_DNS_ENABLED -eq 1 ] ; then MESSAGE="Stopping DNS server" dialog "$MESSAGE" - killproc plc_dnsmasq + pkill -f plc_dnsmasq check result "" fi