Bug 854713 - kdump init script doesn't detect mixed alphanumeric/digit kernel version
kdump init script doesn't detect mixed alphanumeric/digit kernel version
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: kexec-tools (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Chao Fan
Red Hat Kernel QE team
Depends On:
  Show dependency treegraph
Reported: 2012-09-05 12:05 EDT by Konstantin Volkov
Modified: 2015-06-02 04:54 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2015-06-02 04:54:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Konstantin Volkov 2012-09-05 12:05:20 EDT
Description of problem:

kdump init script doesn't detect mixed alphanumeric/digit kernel version

Version-Release number of selected component (if applicable):


How reproducible:

Steps to Reproduce:
1. /etc/init.d/kdump restart
Actual results:
Stopping kdump:                                            [  OK  ]
/etc/init.d/kdump: line 343: [: 042stab061: integer expression expected
Starting kdump:                                            [  OK  ]

Expected results:
Stopping kdump:                                            [  OK  ]
Starting kdump:                                            [  OK  ]

Additional info:

[root@dhcp-10-30-25-79 after]# uname -r
Comment 2 RHEL Product and Program Management 2012-12-14 03:06:46 EST
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 3 cybernet 2013-12-19 20:04:11 EST
no answer ?
not even after an year ?
Comment 4 Baoquan He 2013-12-19 22:01:50 EST
Since this bug was low priority, and PM score is 0, it's deferred. Rhel6 is coming soon, hope to fix it in rhel6.6.

Comment 5 cybernet 2013-12-19 23:01:39 EST
how can i fix it ?
Comment 6 Chao Fan 2015-05-25 02:38:56 EDT
In the /etc/init.d/kdump , 
it uses "$min" -lt "171" to check the kernel is old or not, 
and the $min from
min=`echo $ver | cut -d'-' -f2`
because it is using . to detect, so
when the kernel is like 2.6.32-554.el6.x86_64,it will get 554,
but when the kernel is like 2.6.32-042stab061.2,it will get 042stab061
and then 042stab061 is not an int, so the message display.
I think maybe add a line of code "min=`echo $min | cut -c1-3`" 
after "min=${min%%.*}"  will be helpful.

Chao Fan
Comment 7 Chao Fan 2015-05-25 07:15:50 EDT
By the way, where do you get your kernel?
Why it is different from my kernel like 2.6.32-554.el6.x86_64?

Chao Fan
Comment 8 cybernet 2015-05-25 09:53:33 EDT
@cfan you are the best

Comment 9 Chao Fan 2015-05-25 21:34:32 EDT
OK,the kernel is not redhat's rhel kernl,
but you can follow my suggestion in comment 6,
from my test, it can work.

Note You need to log in before you can comment on or make changes to this bug.