Blame 0016-fips-fixed-boot-dev-handling.patch
|
Harald Hoyer |
a0a888 |
From 01583ae4ad05519a78cf661ff1104cd9b2910aa7 Mon Sep 17 00:00:00 2001
|
|
Harald Hoyer |
a0a888 |
From: Harald Hoyer <harald@redhat.com>
|
|
Harald Hoyer |
a0a888 |
Date: Wed, 30 Mar 2011 14:50:42 +0200
|
|
Harald Hoyer |
a0a888 |
Subject: [PATCH] fips: fixed "boot=<dev>" handling
|
|
Harald Hoyer |
a0a888 |
|
|
Harald Hoyer |
a0a888 |
---
|
|
Harald Hoyer |
a0a888 |
modules.d/01fips/fips.sh | 16 +++++++---------
|
|
Harald Hoyer |
a0a888 |
1 files changed, 7 insertions(+), 9 deletions(-)
|
|
Harald Hoyer |
a0a888 |
|
|
Harald Hoyer |
a0a888 |
diff --git a/modules.d/01fips/fips.sh b/modules.d/01fips/fips.sh
|
|
Harald Hoyer |
a0a888 |
index febe23e..857c355 100755
|
|
Harald Hoyer |
a0a888 |
--- a/modules.d/01fips/fips.sh
|
|
Harald Hoyer |
a0a888 |
+++ b/modules.d/01fips/fips.sh
|
|
Harald Hoyer |
a0a888 |
@@ -4,20 +4,18 @@
|
|
Harald Hoyer |
a0a888 |
do_fips()
|
|
Harald Hoyer |
a0a888 |
{
|
|
Harald Hoyer |
a0a888 |
FIPSMODULES=$(cat /etc/fipsmodules)
|
|
Harald Hoyer |
a0a888 |
- BOOT=$(getarg boot=)
|
|
Harald Hoyer |
a0a888 |
+ boot=$(getarg boot=)
|
|
Harald Hoyer |
a0a888 |
KERNEL=$(uname -r)
|
|
Harald Hoyer |
a0a888 |
case "$boot" in
|
|
Harald Hoyer |
a0a888 |
- block:LABEL=*|LABEL=*)
|
|
Harald Hoyer |
a0a888 |
- boot="${boot#block:}"
|
|
Harald Hoyer |
a0a888 |
+ LABEL=*)
|
|
Harald Hoyer |
a0a888 |
boot="$(echo $boot | sed 's,/,\\x2f,g')"
|
|
Harald Hoyer |
a0a888 |
boot="/dev/disk/by-label/${boot#LABEL=}"
|
|
Harald Hoyer |
a0a888 |
- bootok=1 ;;
|
|
Harald Hoyer |
a0a888 |
- block:UUID=*|UUID=*)
|
|
Harald Hoyer |
a0a888 |
- boot="${boot#block:}"
|
|
Harald Hoyer |
a0a888 |
- boot="/dev/disk/by-uuid/${root#UUID=}"
|
|
Harald Hoyer |
a0a888 |
- bootok=1 ;;
|
|
Harald Hoyer |
a0a888 |
+ ;;
|
|
Harald Hoyer |
a0a888 |
+ UUID=*)
|
|
Harald Hoyer |
a0a888 |
+ boot="/dev/disk/by-uuid/${boot#UUID=}"
|
|
Harald Hoyer |
a0a888 |
+ ;;
|
|
Harald Hoyer |
a0a888 |
/dev/*)
|
|
Harald Hoyer |
a0a888 |
- bootok=1 ;;
|
|
Harald Hoyer |
a0a888 |
+ ;;
|
|
Harald Hoyer |
a0a888 |
*)
|
|
Harald Hoyer |
a0a888 |
die "You have to specify boot=<boot device> as a boot option for fips=1" ;;
|
|
Harald Hoyer |
a0a888 |
esac
|