From 8be3c0cbe1565c3773a7fdf3783dc3f1cf335b23 Mon Sep 17 00:00:00 2001 From: Hugo Villeneuve Date: Wed, 7 Aug 2013 13:39:12 -0400 Subject: [PATCH] Disable DNS server when suspending to RAM To prevent potential problem with bind after resume (not confirmed). --- stage2/misc/acpi/suspend2ram.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/stage2/misc/acpi/suspend2ram.sh b/stage2/misc/acpi/suspend2ram.sh index f3bfd6d..d342990 100755 --- a/stage2/misc/acpi/suspend2ram.sh +++ b/stage2/misc/acpi/suspend2ram.sh @@ -48,7 +48,11 @@ sync cat /proc/bus/pci/$ID > $TMP_FILE # Stopping network. -/etc/rc.d/init.d/named stop + +if [ -f /etc/rc.d/init.d/named ]; then + /etc/rc.d/init.d/named stop +fi + /etc/rc.d/init.d/network stop echo "Entering suspend mode" @@ -63,7 +67,10 @@ echo "Resuming" cat $TMP_FILE > /proc/bus/pci/$ID /etc/rc.d/init.d/network start -/etc/rc.d/init.d/named start + +if [ -f /etc/rc.d/init.d/named ]; then + /etc/rc.d/init.d/named start +fi # remove temporary file rm -f $TMP_FILE -- 2.20.1