 2409 Vagrant Cascadian	2012-11-19
      Also support cryptsetup swap devices backed by NBD.
      http://bugs.debian.org/690267

=== modified file 'client/share/ltsp/nbd-disconnect'
--- old/client/share/ltsp/nbd-disconnect	2012-05-14 19:23:51 +0000
+++ new/client/share/ltsp/nbd-disconnect	2012-11-20 00:40:53 +0000
@@ -32,6 +32,16 @@
             swapoff "$device"
             nbd-client -d "$device"
             ;;
+        /dev/mapper/swap[0-9])
+            nbd_device=$(cryptsetup status "$device" | awk '/device:/{print $2}')
+            swapoff "$device"
+            cryptsetup remove "$device"
+            case "$nbd_device" in
+                /dev/nbd[1-9]) 
+                    nbd-client -d "$nbd_device"
+                    ;;
+            esac
+            ;;
     esac
 done < /proc/swaps
 

