Modify grep regex to account for additional suffixes on old kernel names
authorAndrew Gaffney <agaffney@gentoo.org>
Fri, 26 Dec 2008 21:26:58 +0000 (15:26 -0600)
committerAndrew Gaffney <agaffney@gentoo.org>
Fri, 26 Dec 2008 21:26:58 +0000 (15:26 -0600)
ChangeLog
gen_bootloader.sh

index 0657c4d3574fa5bbb1cbc7d4190a12c589735b10..695ca5123d3bb7913360fc2fbc388c84596040c7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,9 @@
 # Copyright 1999-2008 Gentoo Foundation; 2008 Chris Gianelloni, Andrew Gaffney
 # Distributed under the GPL v2
 
+  26 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> gen_bootloader.sh:
+  Modify grep regex to account for additional suffixes on old kernel names
+
   24 Dec 2008; Andrew Gaffney <agaffney@gentoo.org> gen_cmdline.sh,
   gen_determineargs.sh:
   Add --busybox-config= commandline option
index ee13ae6e827754f8c751dc18000fc58f76c67e66..2eb628bb5dde816a4c4904ff1cf281fde2a75ac1 100755 (executable)
@@ -96,8 +96,8 @@ set_bootloader_grub_duplicate_default_replace_kernel_initrd() {
 
 set_bootloader_grub_check_for_existing_entry() {
        local GRUB_CONF=$1
-       if grep -q "^[[:space:]]*kernel[[:space:]=]*.*/kernel-${KNAME}-${ARCH}-${KV}\>" "${GRUB_CONF}" &&
-               grep -q "^[[:space:]]*initrd[[:space:]=]*.*/initramfs-${KNAME}-${ARCH}-${KV}\>" "${GRUB_CONF}"
+       if grep -q "^[[:space:]]*kernel[[:space:]=]*.*/kernel-${KNAME}-${ARCH}-${KV}\([[:space:]]\|$\)" "${GRUB_CONF}" &&
+               grep -q "^[[:space:]]*initrd[[:space:]=]*.*/initramfs-${KNAME}-${ARCH}-${KV}\([[:space:]]\|$\)" "${GRUB_CONF}"
        then
                return 0
        fi