summaryrefslogtreecommitdiff
path: root/debian/initramfs-tools.preinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/initramfs-tools.preinst')
-rw-r--r--debian/initramfs-tools.preinst6
1 files changed, 4 insertions, 2 deletions
diff --git a/debian/initramfs-tools.preinst b/debian/initramfs-tools.preinst
index b92d393..7b02612 100644
--- a/debian/initramfs-tools.preinst
+++ b/debian/initramfs-tools.preinst
@@ -8,9 +8,11 @@ case "$1" in
mkdir -p /etc/initramfs-tools/conf.d
# First time install. Can we autodetect the RESUME partition?
- RESUME=$(tail -n $(($(wc -l /proc/swaps | awk ' { print $1 } ') - 1)) /proc/swaps | sort -rk3 | head -n 1 | awk ' { print $1 } ')
+ 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 } ')
+ fi
- # Inhertic initrd-tools settings if possible.
+ # Inherit initrd-tools settings if possible.
if [ -e /etc/mkinitrd/mkinitrd.conf ]; then
. /etc/mkinitrd/mkinitrd.conf
fi