#!/bin/sh -fu
# get first suitable swap, configure resume (if any)

. install2-init-functions

chroot $destdir hal-find-by-property --key volume.fstype --string swap \
| xargs -i chroot $destdir hal-get-property --udi {} --key volume.uuid \
| head -n 1 \
| (
	read UUID ||:
	[ -z "$UUID" ] || 
		subst 's,^append=",&resume='/dev/disk/by-uuid/$UUID' ,' \
		"$destdir"/usr/share/alterator-lilo/template/lilo.conf ||:
)

:
