]> git.ipfire.org Git - thirdparty/plymouth.git/commitdiff
Change heuristics in update script for finding which initrd to repack
authorRay Strode <rstrode@redhat.com>
Tue, 10 Jun 2008 14:36:53 +0000 (10:36 -0400)
committerRay Strode <rstrode@redhat.com>
Tue, 10 Jun 2008 14:36:53 +0000 (10:36 -0400)
Before we were using the current initrd, now we use the default initrd
This will hopefully prevent the mismatched kernel/initrd problem.

scripts/plymouth-update-initrd

index 363c44c963fa8066acef1ecd0444bb64122a02a8..6bf8ba9860d2016084158ad77bb3a7a54c81e047 100755 (executable)
@@ -6,7 +6,7 @@ set -e
 
 [ -z "$LIBEXECDIR" ] && LIBEXECDIR="/usr/libexec"
 [ -z "$DATADIR" ] && DATADIR="/usr/share"
-[ -z "$INITRD" ] && INITRD="/boot/initrd-$(/bin/uname -r).img"
+[ -z "$INITRD" ] && INITRD="/boot/initrd-$(/sbin/grubby --default-kernel | sed 's/.*vmlinuz-//g').img"
 [ -z "$SYSTEMMAP" ] && SYSTEM_MAP="/boot/System.map-$(/bin/uname -r)"
 [ -z "$LIB" ] && [ $(head -n1 $SYSTEM_MAP | awk '{print $1}' | wc -c) -lt 16 ] && LIB="lib" || LIB="lib64"
 [ -z "$LIBDIR" ] && LIBDIR="/usr/$LIB"