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

. install2-init-functions

blkid \
| fgrep 'TYPE="swap"'\
| egrep -v '/dev/(evms|dm-|md)' \
| head -n 1 \
| cut -d: -f1 \
| (
	read SWAPDEV
	[ -z "$SWAPDEV" ] || subst 's,^append=",&resume='$SWAPDEV' ,' \
		"$destdir"/usr/share/alterator-lilo/template/lilo.conf
)
