Skip to content

Commit 1268f5d

Browse files
committed
minor changes
1 parent c9b0f97 commit 1268f5d

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

scripts/vm/hypervisor/kvm/kvmsmpheartbeat.sh

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ do
4242
case $OPTION in
4343
i)
4444
NfsSvrIP="$OPTARG"
45-
;; # retained for CLI compatibility but unused for local-only script
45+
;; # retained for CLI compatibility but unused for this script
4646
p)
4747
NfsSvrPath="$OPTARG"
48-
;; # retained for CLI compatibility but unused for local-only script
48+
;; # retained for CLI compatibility but unused for this script
4949
m)
5050
MountPoint="$OPTARG"
5151
;;
@@ -67,7 +67,7 @@ do
6767
esac
6868
done
6969

70-
# For local-only heartbeat we require a mountpoint
70+
# For heartbeat we require a mountpoint
7171
if [ -z "$MountPoint" ]
7272
then
7373
echo "Mount point (-m) is required"
@@ -83,17 +83,6 @@ if [ ! -d "$MountPoint" ]; then
8383
fi
8484
fi
8585

86-
# Determine a sensible HostIP if not provided
87-
if [ -z "$HostIP" ]; then
88-
# try to get a non-loopback IPv4 address, fallback to hostname
89-
ipaddr=$(hostname -I 2>/dev/null | awk '{print $1}')
90-
if [ -n "$ipaddr" ]; then
91-
HostIP="$ipaddr"
92-
else
93-
HostIP=$(hostname)
94-
fi
95-
fi
96-
9786
#delete VMs on this mountpoint (best-effort)
9887
deleteVMs() {
9988
local mountPoint=$1

0 commit comments

Comments
 (0)