On Thu, Jan 29, 2015 at 06:09:11PM +0800, Baoquan He wrote:
+ local _boot_dir
+ #If user specify a boot dir for kdump kernel, let's use it. Otherwise
+ #assume it's in the same place as 1st kernel.
+ #The BOOT_IMAGE is number like 0,1,.. , for now not handle it.
+ [ -n "$KDUMP_BOOTDIR" ] && return
+ [ "$(uname -m)" = "s390x" ] && return
+ _boot_dir=$(cat /proc/cmdline | grep "BOOT_IMAGE")
+ if [ -z "$_boot_dir" ]; then
+ eval $(echo "$_boot_dir" | cut -d' ' -f1)
+ KDUMP_BOOTDIR="/boot"$(dirname $BOOT_IMAGE)
I think a better way to code this is following.
else if is_it_atomic_system;
look for boot_image on /proc/cmdline; return
That way you don't have to hardcode things for s390. And behavior will
remain unchanged for systems which are not atomic.
And you can grep for ostree= on /proc/cmdline to figure out if you are
booting on atomic system or not.