File tree Expand file tree Collapse file tree
scripts/vm/hypervisor/kvm Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -115,18 +115,17 @@ deleteVMs() {
115115}
116116
117117# checking is there the mount point present under $MountPoint?
118- mounts=$( cat /proc/mounts | grep " $MountPoint " )
119- if [ $? -gt 0 ]
118+ if grep -q " ^[^ ]\+ $MountPoint " /proc/mounts
120119then
121- # mount point not present — we don't remount in local-only script
122- # nothing to do here; keep for compatibility with original flow
123- :
124- else
125120 # mount exists; if not in read-check mode, consider deleting VMs similar to original behavior
126121 if [ " $rflag " == " 0" ]
127122 then
128123 deleteVMs $MountPoint
129124 fi
125+ else
126+ # mount point not present — we don't remount in local-only script
127+ # nothing to do here; keep for compatibility with original flow
128+ :
130129fi
131130
132131hbFolder=" $MountPoint /KVMHA/"
You can’t perform that action at this time.
0 commit comments