summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2010-12-14 19:58:14 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 19:20:39 +0100
commit3854710095b261578abb24364ea77d440736624b (patch)
tree93b54b2e56888ca351eccb5ca39f192c96034c40 /examples
parentaad4e4804284bb5fbfda0328c4a83c25f53d3ed6 (diff)
downloadvyos-live-build-3854710095b261578abb24364ea77d440736624b.tar.gz
vyos-live-build-3854710095b261578abb24364ea77d440736624b.zip
Updating losetup-lukshome example hook to use blkid where available, thanks to Clint Adams <clint@gnu.org> (Closes: #607108).
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/hooks/all_chroot_losetup-lukshome.sh22
1 files changed, 1 insertions, 21 deletions
diff --git a/examples/hooks/all_chroot_losetup-lukshome.sh b/examples/hooks/all_chroot_losetup-lukshome.sh
index 95d3c053a..b5e372638 100755
--- a/examples/hooks/all_chroot_losetup-lukshome.sh
+++ b/examples/hooks/all_chroot_losetup-lukshome.sh
@@ -333,27 +333,7 @@ do
esac
done
-# search for a partition labeled "lukshome" or $LUKSPART
-for sysblock in $(echo /sys/block/* | tr ' ' '\n' | grep -v loop | grep -v ram | grep -v fd)
-do
- for dev in $(subdevices "${sysblock}")
- do
- devname=$(sys2dev "${dev}")
- # find partition name and filesystem type
- if [ "$(/lib/udev/vol_id -l ${devname} 2>/dev/null)" = "${LUKSPART}" ]
- then
- # found one partition with correct label
- CRYPTHOME="${devname}"
- # don't search further
- break
- fi
- done
- # if already found, don't search further
- if [ -n "${CRYPTHOME}" ]
- then
- break
- fi
-done
+CRYPTHOME=$(/sbin/blkid -L ${LUKSPART})
# if no partition found, exit
if [ -z "${CRYPTHOME}" ]