aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/rc.sysinit
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2008-01-10 19:45:14 +0000
committerBill Nottingham <notting@redhat.com>2008-01-10 19:45:14 +0000
commit473a1b7e6a0069db4e4973a732588cd7e911cffe (patch)
tree064750341ff7e4cad7d72a5ce826fa75c316c43e /rc.d/rc.sysinit
parent98d4f658381428b0c57fd550fe5024075d3a0093 (diff)
downloadinitscripts-473a1b7e6a0069db4e4973a732588cd7e911cffe.tar
initscripts-473a1b7e6a0069db4e4973a732588cd7e911cffe.tar.gz
initscripts-473a1b7e6a0069db4e4973a732588cd7e911cffe.tar.bz2
initscripts-473a1b7e6a0069db4e4973a732588cd7e911cffe.tar.xz
initscripts-473a1b7e6a0069db4e4973a732588cd7e911cffe.zip
add LUKS uuid support (#360071, <karsten@redhat.com>)
Diffstat (limited to 'rc.d/rc.sysinit')
-rwxr-xr-xrc.d/rc.sysinit14
1 files changed, 11 insertions, 3 deletions
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 2fc18a5b..eda79ffa 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -119,10 +119,12 @@ init_crypto() {
fi
if [ -n "$key" -a "x$key" != "xnone" ]; then
if test -e "$key" ; then
+ owner=$(ls -l $key | (read a b owner rest; echo $owner))
+ if ! key_is_random "$key"; then
mode=$(ls -l "$key" | cut -c 5-10)
- owner=$(ls -l $key | awk '{ print $3 }')
- if [ "$mode" != "------" ] && ! key_is_random "$key"; then
- echo $"INSECURE MODE FOR $key"
+ if [ "$mode" != "------" ]; then
+ echo $"INSECURE MODE FOR $key"
+ fi
fi
if [ "$owner" != root ]; then
echo $"INSECURE OWNER FOR $key"
@@ -139,6 +141,12 @@ init_crypto() {
makeswap=""
mke2fs=""
skip=""
+ # Parse the src field for UUID= and convert to real device names
+ if [ "${src%%=*}" == "UUID" ]; then
+ src=`/sbin/blkid -t "$src" -o device|(read oneline;echo $oneline)`
+ elif [ "${src/^\/dev\/disk\/by-uuid\/}" != "$src" ]; then
+ src=$(__readlink $src)
+ fi
# Parse the options field, convert to cryptsetup parameters
# and contruct the command line
while [ -n "$opt" ]; do