From 27ff6737efe5ed3d4b17b4d4409ad4734e84d519 Mon Sep 17 00:00:00 2001 From: Chris Lamb Date: Wed, 26 Mar 2008 08:02:59 +0000 Subject: scripts/live-helpers: Fixes for set -e This patch applies two fixes intended for when "scripts/live-helpers" is sourced by a "set -e" script such as live-snapshot. --- scripts/live-helpers | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'scripts') diff --git a/scripts/live-helpers b/scripts/live-helpers index 203ee4c..771ab85 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -35,8 +35,8 @@ get_fstype () local FSSIZE # fstype misreports LUKS devices - is_luks "${1}" - if [ $? -eq 0 ]; then + if is_luks "${1}" + then /lib/udev/vol_id -t ${1} 2>/dev/null return fi @@ -321,8 +321,8 @@ is_luks() devname="${1}" if [ -x /sbin/cryptsetup ] then - /sbin/cryptsetup isLuks "${devname}" 2>/dev/null - return $? + /sbin/cryptsetup isLuks "${devname}" 2>/dev/null || ret=${?} + return ${ret} else return 1 fi -- cgit v1.2.3