On 01/28/15 at 02:01pm, Vivek Goyal wrote:
On Wed, Jan 28, 2015 at 04:29:52PM +0800, Baoquan He wrote:
[..]
> +adjust_boot_dir()
> +{
> + #If user specify different boot dir then /boot, he need take care of
> + # the whole thing like /boot//ostree/rhel-atomicxxxx/vmlinuz-xxx
> + [ $KDUMP_BOOTDIR != "/boot" ] && return
> + eval $(cat /proc/cmdline | grep "BOOT_IMAGE" | cut -d' '
-f1)
This is assuming that BOOT_IMAGE is always first field in the command
line. I think one should always be able to change the order by simple
editing of grub.cfg. So let us not make this assumption.
I had a test and it have to be at the head, otherwise it can't find
vmlinuz-xxx. This can make code simple and easier to read. And kernel
produce the /proc/cmdline, it should always be that BOOT_IMAGE is the
first field in cmdline. If later a different situation reported, we can
change it like Dave suggested.
Anyway, I think for now this way is enough. If you or someone else
insist that this is not good, I can change.
Thanks
Vivek