diff options
author | maximilian attems <maks@debian.org> | 2009-03-30 00:23:54 +0200 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2009-03-30 00:23:54 +0200 |
commit | 89257a84d0bfcd46d5514c65245b7b3f57f67ddf (patch) | |
tree | e726af2f5ec772e89ed4dee3a41f517ef18f5429 /update-initramfs | |
parent | ff34476ecd5de0da1104b13e6b42e6cc9eff8792 (diff) | |
download | initramfs-tools-89257a84d0bfcd46d5514c65245b7b3f57f67ddf.tar.gz initramfs-tools-89257a84d0bfcd46d5514c65245b7b3f57f67ddf.zip |
update-initramfs: mbr_check() use /boot/grub/grub.cfg for grub2 search.
only comes into play if lilo is installed too and usage is not
configured by do_bootloader in /etc/kernel-img.conf.
(closes: #427509)
Diffstat (limited to 'update-initramfs')
-rwxr-xr-x | update-initramfs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/update-initramfs b/update-initramfs index 2eed8cb..8c085a5 100755 --- a/update-initramfs +++ b/update-initramfs @@ -187,8 +187,10 @@ run_lilo() # check if lilo is on mbr mbr_check() { - # try to discover grub and be happy - # FIXME: check grub2 /boot/grub/grub.cfg + # try to discover grub|grub2 and be happy + [ -r /boot/grub/grub.cfg ] \ + && groot=$(awk '/^set root=/{print substr($2, 7, 3); exit}' \ + /boot/grub/grub.cfg) [ -r /boot/grub/menu.lst ] \ && groot=$(awk '/^root/{print substr($2, 2, 3); exit}' \ /boot/grub/menu.lst) |