#!patch

Search for available swap space, automatically.

--- system.orig	2006-09-11 11:20:57.000000000 +0200
+++ system	2006-09-11 11:22:04.000000000 +0200
@@ -89,6 +91,14 @@
 
 	title "Activating swap devices."
 	swapon -a || error=$?
+	for x in /dev/{hd,sd}??*; do
+		[ -e $x ] || continue
+		if disktype $x | grep -q Swap &&
+		   ! grep -q $x /proc/swaps; then
+			echo "Discovered swap space on $x, activating."
+			swapon $x
+		fi
+	done
     	status
 
 	title "Refresh utmp, delete lock and tmp files and other stuff."
