diff options
| author | Andrey Asadchev <asadchev@gmail.com> | 2008-02-29 12:01:58 +0100 |
|---|---|---|
| committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 17:31:06 +0100 |
| commit | 137f616fb77851cf84c0c2b3f99d77f4337424c4 (patch) | |
| tree | 93b0506533d30e79b89b2ade67641c865aeb502c /scripts/live-helpers | |
| parent | 9171ce28fbec2c18a19730044d1ac2157ccb396b (diff) | |
| download | live-boot-137f616fb77851cf84c0c2b3f99d77f4337424c4.tar.gz live-boot-137f616fb77851cf84c0c2b3f99d77f4337424c4.zip | |
Patch to use cryptsetup volumes for persistent storage.
Cryptsetup must be used with usual
"cryptopts=source=UUID=$(UUID),target=$(TARGET)". For USB devices it may be
necessary to specify "rootdelay=$SECONDS" in order to wait for USB media.
Diffstat (limited to 'scripts/live-helpers')
| -rw-r--r-- | scripts/live-helpers | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/live-helpers b/scripts/live-helpers index 504a3f4..807553a 100644 --- a/scripts/live-helpers +++ b/scripts/live-helpers @@ -34,6 +34,13 @@ get_fstype () local FSTYPE local FSSIZE + # fstype misreports LUKS devices + is_luks "${1}" + if [ $? -eq 0 ]; then + /lib/udev/vol_id -t ${1} 2>/dev/null + return + fi + eval $(fstype < ${1}) if [ "${FSTYPE}" != "unknown" ] @@ -306,3 +313,16 @@ get_mac () echo ${mac} } + +is_luks() +{ + devname="${1}" + if [ -x /sbin/cryptsetup ] + then + /sbin/cryptsetup isLuks "${devname}" 2>/dev/null + return $? + else + return 1 + fi + +} |
