PATCH [5.4 mkinitrd fips]: ia64 has /boot/efi instead of /boot

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Peter can you please review the attached patch for 5.4 ?

Thanks,

Hans

ia64 has /boot/efi instead of /boot
diff -up mkinitrd-5.1.19.6/mkinitrd~ mkinitrd-5.1.19.6/mkinitrd
--- mkinitrd-5.1.19.6/mkinitrd~	2009-06-11 11:30:00.000000000 +0200
+++ mkinitrd-5.1.19.6/mkinitrd	2009-06-11 11:36:28.690868151 +0200
@@ -1173,11 +1173,18 @@ if [ $TMPDIR = "/root" -o $TMPDIR = "${P
 fi
 
 if [ "$withfips" -eq 1 ]; then
-    bootfs=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/boot") { print $3; }}' $fstab)
-    bootdev=$(awk '/^[ \t]*[^#]/ { if ($2 == "/boot") { print $1; }}' $fstab)
+    if [ "$(uname -m)" == "ia64" ]; then
+        bootfs=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/boot/efi") { print $3; }}' $fstab)
+        bootdev=$(awk '/^[ \t]*[^#]/ { if ($2 == "/boot/efi") { print $1; }}' $fstab)
+        BOOT=/boot/efi
+    else
+        bootfs=$(awk '{ if ($1 !~ /^[ \t]*#/ && $2 == "/boot") { print $3; }}' $fstab)
+        bootdev=$(awk '/^[ \t]*[^#]/ { if ($2 == "/boot") { print $1; }}' $fstab)
+        BOOT=/boot
+    fi
 
     if [ -z "$bootfs" ]; then
-        error "ERROR: fips without a separate /boot partition is not supported!"
+        error "ERROR: fips without a separate $BOOT partition is not supported!"
         exit 1
     fi
 
@@ -1193,7 +1200,7 @@ if [ "$withfips" -eq 1 ]; then
 
     BOOTMODULES="$MODULES"
     MODULES=""
-    vecho "Using /boot modules: $BOOTMODULES"
+    vecho "Using $BOOT modules: $BOOTMODULES"
 
     FIPSMODULES="aead aes_generic -aes-x86_64 ansi_cprng cbc ccm chainiv ctr"
     FIPSMODULES="$FIPSMODULES des deflate ecb eseqiv hmac seqiv sha256 sha512"
@@ -1751,7 +1758,7 @@ emit "mkblkdevs"
 
 if [ "$withfips" -eq 1 ]; then
     emit_modules $BOOTMODULES
-    emit "echo Mounting /boot and integrity checking the kernel"
+    emit "echo Mounting $BOOT and integrity checking the kernel"
     emit "mkdir /boot"
     emit "mount -t $bootfs -o ro $bootdev /boot"
     emit "sha512hmac -c /boot/.vmlinuz-$kernel.hmac"
_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux