When kexec_crash_loaded does not exist, means kdump was not enabled in kernel we get
$ kdumpctl status cat: /sys/kernel/kexec_crash_loaded: No such file or directory /usr/bin/kdumpctl: line 879: [: ==: unary operator expected Kdump is not operational
After this patch: $ kdumpctl status Perhaps CONFIG_CRASH_DUMP is not enabled in kernel Kdump is not operational
Signed-off-by: Pratyush Anand panand@redhat.com --- kdumpctl | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/kdumpctl b/kdumpctl index 4d68be0c292d..9afce8f4f2f2 100755 --- a/kdumpctl +++ b/kdumpctl @@ -876,6 +876,11 @@ check_current_fadump_status()
check_current_kdump_status() { + if [ ! -f /sys/kernel/kexec_crash_loaded ];then + echo "Perhaps CONFIG_CRASH_DUMP is not enabled in kernel" + return 1 + fi + rc=`cat /sys/kernel/kexec_crash_loaded` if [ $rc == 1 ]; then return 0
On 04/07/2017 at 12:17 PM, Pratyush Anand wrote:
When kexec_crash_loaded does not exist, means kdump was not enabled in kernel we get
$ kdumpctl status cat: /sys/kernel/kexec_crash_loaded: No such file or directory /usr/bin/kdumpctl: line 879: [: ==: unary operator expected Kdump is not operational
After this patch: $ kdumpctl status Perhaps CONFIG_CRASH_DUMP is not enabled in kernel Kdump is not operational
Signed-off-by: Pratyush Anand panand@redhat.com
Reviewed-by: Xunlei Pang xlpang@redhat.com
kdumpctl | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/kdumpctl b/kdumpctl index 4d68be0c292d..9afce8f4f2f2 100755 --- a/kdumpctl +++ b/kdumpctl @@ -876,6 +876,11 @@ check_current_fadump_status()
check_current_kdump_status() {
- if [ ! -f /sys/kernel/kexec_crash_loaded ];then
echo "Perhaps CONFIG_CRASH_DUMP is not enabled in kernel"
return 1
- fi
- rc=`cat /sys/kernel/kexec_crash_loaded` if [ $rc == 1 ]; then return 0
Hi Pratyush,
On Fri, Apr 7, 2017 at 9:47 AM, Pratyush Anand panand@redhat.com wrote:
When kexec_crash_loaded does not exist, means kdump was not enabled in kernel we get
$ kdumpctl status cat: /sys/kernel/kexec_crash_loaded: No such file or directory /usr/bin/kdumpctl: line 879: [: ==: unary operator expected Kdump is not operational
After this patch: $ kdumpctl status Perhaps CONFIG_CRASH_DUMP is not enabled in kernel Kdump is not operational
Signed-off-by: Pratyush Anand panand@redhat.com
kdumpctl | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/kdumpctl b/kdumpctl index 4d68be0c292d..9afce8f4f2f2 100755 --- a/kdumpctl +++ b/kdumpctl @@ -876,6 +876,11 @@ check_current_fadump_status()
check_current_kdump_status() {
if [ ! -f /sys/kernel/kexec_crash_loaded ];then
echo "Perhaps CONFIG_CRASH_DUMP is not enabled in kernel"
return 1
fi
rc=`cat /sys/kernel/kexec_crash_loaded` if [ $rc == 1 ]; then return 0
--
Reviewed-by: Bhupesh Sharma bhsharma@redhat.com
On 04/07/17 at 09:47am, Pratyush Anand wrote:
When kexec_crash_loaded does not exist, means kdump was not enabled in kernel we get
$ kdumpctl status cat: /sys/kernel/kexec_crash_loaded: No such file or directory /usr/bin/kdumpctl: line 879: [: ==: unary operator expected Kdump is not operational
After this patch: $ kdumpctl status Perhaps CONFIG_CRASH_DUMP is not enabled in kernel Kdump is not operational
Signed-off-by: Pratyush Anand panand@redhat.com
kdumpctl | 5 +++++ 1 file changed, 5 insertions(+)
diff --git a/kdumpctl b/kdumpctl index 4d68be0c292d..9afce8f4f2f2 100755 --- a/kdumpctl +++ b/kdumpctl @@ -876,6 +876,11 @@ check_current_fadump_status()
check_current_kdump_status() {
- if [ ! -f /sys/kernel/kexec_crash_loaded ];then
echo "Perhaps CONFIG_CRASH_DUMP is not enabled in kernel"
return 1
- fi
- rc=`cat /sys/kernel/kexec_crash_loaded` if [ $rc == 1 ]; then return 0
-- 2.9.3 _______________________________________________ kexec mailing list -- kexec@lists.fedoraproject.org To unsubscribe send an email to kexec-leave@lists.fedoraproject.org
Acked-by: Dave Young dyoung@redhat.com
Thanks Dave