diff options
author | maximilian attems <maks@debian.org> | 2008-07-05 02:15:14 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2008-07-05 02:15:14 +0200 |
commit | 6d6f6125e9b165b296f437c788d981ef749a91e8 (patch) | |
tree | e366b662e98604a1247f6d87003a047eb177e132 /debian | |
parent | 02def425ba404c5cde8c8e59207961d6b3fddd8f (diff) | |
download | initramfs-tools-6d6f6125e9b165b296f437c788d981ef749a91e8.tar.gz initramfs-tools-6d6f6125e9b165b296f437c788d981ef749a91e8.zip |
initramfs-tools.preinst: Try to use UUID for resume device.
ubuntu merge.
Diffstat (limited to 'debian')
-rw-r--r-- | debian/initramfs-tools.preinst | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst index 6a8b88f..3c8a9b0 100644 --- a/debian/initramfs-tools.preinst +++ b/debian/initramfs-tools.preinst @@ -20,6 +20,10 @@ case "$1" in # First time install. Can we autodetect the RESUME partition? if [ -r /proc/swaps ]; then RESUME=$(tail -n $(($(wc -l /proc/swaps | awk ' { print $1 } ') - 1)) /proc/swaps | sort -rk3 | head -n 1 | awk ' { print $1 } ') + UUID=$(/sbin/vol_id -u "$RESUME" || true) + if [ -n "$UUID" ]; then + RESUME="UUID=$UUID" + fi fi # Inherit initrd-tools settings if possible. |