summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorRay Strode <rstrode@redhat.com>2008-05-30 09:34:08 -0400
committerRay Strode <rstrode@redhat.com>2008-05-30 09:34:08 -0400
commit9d34239801b9dfa5dcc16db53fe27a8efd47c567 (patch)
tree954094b5e0b76e2928b5994391f4c6fda26ccd8f /scripts
parent3bb498ca0a05db9ace88b27b9d27cad010eaa020 (diff)
downloadplymouth-9d34239801b9dfa5dcc16db53fe27a8efd47c567.tar.gz
plymouth-9d34239801b9dfa5dcc16db53fe27a8efd47c567.tar.xz
plymouth-9d34239801b9dfa5dcc16db53fe27a8efd47c567.zip
Read default kernel after removing graphic boot entry from grub.conf
That may fix a bug with plymouth-update-initrd that causes it to sometimes pick the wrong kernel for the initrd it uses.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/plymouth-update-initrd6
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/plymouth-update-initrd b/scripts/plymouth-update-initrd
index e5e0414..8793ba1 100755
--- a/scripts/plymouth-update-initrd
+++ b/scripts/plymouth-update-initrd
@@ -66,20 +66,20 @@ TMPDIR="$(mktemp -d $PWD/initrd.XXXXXXXXXX)"
rm -rf "$TMPDIR"
-CURRENT_KERNEL=$(/sbin/grubby --default-kernel)
-
# XXX: Hack to clean out old entry since grubby doesn't deal with dupes too well
if fgrep -q "title $GRUB_MENU_TITLE" /etc/grub.conf; then
TMPFILE="$(mktemp /etc/grub.conf.XXXXXXXXXX)"
if [ -L /etc/grub.conf ]; then
GRUB_CONF="$(readlink /etc/grub.conf)"
- else
+ else
GRUB_CONF="/etc/grub.conf"
fi
(cd /etc; awk '$1 != "'"$GRUB_MENU_TITLE"'" { printf $0 RT }' RS="title " FS="\n" $GRUB_CONF > $TMPFILE \
&& mv $TMPFILE $GRUB_CONF || rm -f $TMPFILE)
fi
+CURRENT_KERNEL=$(/sbin/grubby --default-kernel)
+
/sbin/grubby --title="$GRUB_MENU_TITLE" \
--add-kernel="$CURRENT_KERNEL" \
--copy-default \