summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorChris Lamb <chris@chris-lamb.co.uk>2008-03-26 08:02:59 +0000
committerDaniel Baumann <daniel@debian.org>2011-03-09 17:47:58 +0100
commit27ff6737efe5ed3d4b17b4d4409ad4734e84d519 (patch)
tree7fe3a7cc86da1e44b6f584c688e8c6bf306a643d /scripts
parent96f8eac0868d9eefc94763572a5eadb427a3d7ad (diff)
downloadlive-boot-27ff6737efe5ed3d4b17b4d4409ad4734e84d519.tar.gz
live-boot-27ff6737efe5ed3d4b17b4d4409ad4734e84d519.zip
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.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/live-helpers8
1 files changed, 4 insertions, 4 deletions
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