Fix bug with sleep button event handler and netlink
[hvlinux.git] / stage2 / misc / acpi / suspend2ram.sh
index f3bfd6d..a98df77 100755 (executable)
@@ -48,7 +48,12 @@ sync
 cat /proc/bus/pci/$ID > $TMP_FILE
 
 # Stopping network.
-/etc/rc.d/init.d/named stop
+
+# Check if NFS server functionality is desired
+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"
@@ -62,8 +67,11 @@ echo "Resuming"
 # on resume
 cat $TMP_FILE > /proc/bus/pci/$ID
 
-/etc/rc.d/init.d/network start
-/etc/rc.d/init.d/named start
+/etc/rc.d/init.d/network 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