a8921f04ae
Currently in the whole kdump framework, we have some common functions used across not only mkdumprd context and dracut context, but also 1st kernel and 2nd kernel. We defined these functions at each script, which is obviously not decent. So let's introduce kdump-lib.sh for the shared functions and put it to /lib/kdump/kdump-lib.sh. It starts small, as you can see, only 3 functions are extracted. But in the future more and more common functions can be added. Signed-off-by: WANG Chao <chaowang@redhat.com> Acked-by: Vivek Goyal <vgoyal@redhat.com>
20 lines
236 B
Bash
Executable File
20 lines
236 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Kdump common functions
|
|
#
|
|
|
|
is_ssh_dump_target()
|
|
{
|
|
grep -q "^ssh[[:blank:]].*@" /etc/kdump.conf
|
|
}
|
|
|
|
is_nfs_dump_target()
|
|
{
|
|
grep -q "^nfs" /etc/kdump.conf
|
|
}
|
|
|
|
is_raw_dump_target()
|
|
{
|
|
grep -q "^raw" /etc/kdump.conf
|
|
}
|