From cc534fcc2c7fa9a83ed7b6996208f07cca2f28d9 Mon Sep 17 00:00:00 2001 From: Marc Fiuczynski Date: Mon, 15 Jun 2009 16:21:30 +0000 Subject: [PATCH] cleaning up messaging related to 'service plc stop' --- plc.d/db | 5 +++-- plc.d/dns | 21 ++++++++++++++------- plc.d/network | 3 ++- 3 files changed, 19 insertions(+), 10 deletions(-) diff --git a/plc.d/db b/plc.d/db index 3f0f8fd..80c4009 100755 --- a/plc.d/db +++ b/plc.d/db @@ -175,8 +175,9 @@ EOF ;; stop) - MESSAGE=$"Ignoring request to stop myplc databases" - result "$MESSAGE" + MESSAGE="Ignoring request to stop myplc databases" + dialog "$MESSAGE" + result "" ;; *) diff --git a/plc.d/dns b/plc.d/dns index b195809..1840f32 100755 --- a/plc.d/dns +++ b/plc.d/dns @@ -23,7 +23,7 @@ set -x case "$1" in start) if [ $PLC_DNS_ENABLED -eq 1 ] ; then - MESSAGE=$"Starting DNS server" + MESSAGE="Starting DNS server" dialog "$MESSAGE" dns-config @@ -32,7 +32,7 @@ case "$1" in # Set up nameservers if [ -n "$PLC_NET_DNS1" -o -n "$PLC_NET_DNS2" ] ; then - MESSAGE=$"Configuring resolv.conf" + MESSAGE="Configuring resolv.conf" dialog "$MESSAGE" rfile=$(mktemp) @@ -63,9 +63,9 @@ case "$1" in ;; stop) - MESSAGE=$"Reverting /etc/resolv.conf and /etc/hosts" - dialog "$MESSAGE" if [ $PLC_DNS_ENABLED -eq 1 ] ; then + MESSAGE=$"Reverting /etc/resolv.conf" + dialog "$MESSAGE" if [ -f "/etc/plc_resolv.conf" ] ; then ourfile=$(grep "$SIGNATURE" /etc/plc_resolv.conf| wc -l) if [ $ourfile -ne 0 ] ; then @@ -73,21 +73,28 @@ case "$1" in fi mv -f /etc/plc_resolv.conf /etc/resolv.conf fi + check + result "" + MESSAGE=$"Removing /etc/plc_hosts" + dialog "$MESSAGE" [ -f "/etc/plc_hosts" ] && rm -f /etc/plc_hosts + result "" fi if [ $PLC_DNS_ENABLED -eq 0 -a -f "/etc/resolv_plc.backup" ] ; then + MESSAGE="Restoring /etc/resolv.conf" + dialog "$MESSAGE" mv -f /etc/resolv_plc.backup /etc/resolv.conf + result "" fi if [ $PLC_DNS_ENABLED -eq 1 ] ; then - MESSAGE=$"Stopping DNS server" + MESSAGE="Stopping DNS server" dialog "$MESSAGE" - killproc plc_dnsmasq check + result "" fi - result "$MESSAGE" ;; esac diff --git a/plc.d/network b/plc.d/network index 39d44e9..e650d4b 100755 --- a/plc.d/network +++ b/plc.d/network @@ -51,7 +51,8 @@ case "$1" in if [ -f /etc/hosts_plc.backup ] ; then mv -f /etc/hosts_plc.backup /etc/hosts fi - result "$MESSAGE" + dialog "$MESSAGE" + result "" ;; esac -- 2.43.0