diff options
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) |