We only checked `hostname` is in listed in fence_kdump_nodes of
kdump.conf. But `hostname -s` also can not be listed in
fence_kdump_nodes. Now adding this check for short hostname.
Signed-off-by: WANG Chao <chaowang(a)redhat.com>
Acked-by: Vivek Goyal <vgoyal(a)redhat.com>
---
kdumpctl | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/kdumpctl b/kdumpctl
index c144c19..9f9af2d 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -228,12 +228,11 @@ backup_initrd()
check_config_fence_kdump_nodes()
{
- local hostname=`hostname`
local nodes="$1"
for node in $nodes; do
- if [ "$node" = "$hostname" ]; then
- echo "Option fence_kdump_nodes cannot contain $hostname"
+ if [ "$node" = $(hostname) -o "$node" = $(hostname -s) ]; then
+ echo "Option fence_kdump_nodes cannot contain $(hostname) or $(hostname
-s)"
return 1
fi
done
--
1.9.3