[Pkg-ltsp-devel] Bug#365578: ltsp-client: Should usage local swap
partitions when found
Petter Reinholdtsen
pere at hungry.com
Mon May 1 08:43:23 UTC 2006
Package: ltsp-client
Version: 0.82debian2
Severity: wishlist
When running on an thin client with a local disk and a swap partition
on this disk, the client should enable this swap to reduce the chance
of running out of memory.
Something like this might work. This patch is not tested, and
probably need more work. The idea here is to use sfdisk to locate the
swap partitions. sfdisk will operate on all disks if no disk is given
on the command line, and the awk command will extract all partitions
with id 82 (Linux swap).
--- debian/ltsp-client.ltsp-client-setup.init
+++ debian/ltsp-client.ltsp-client-setup.init
@@ -48,6 +48,11 @@
NBD_PORT[0]=$NBD_PORT
EOF
fi
+ # Enable local swap partition if found on local disk
+ for part in `sfdisk -l 2>/dev/null | awk '/ 82 / { print $1}'`; do
+ mkswap $part
+ swapon $part
+ done
}
configure_resolver() {
More information about the Pkg-ltsp-devel
mailing list