+ #cmdSystemOrEval("lvremove -f $dev >/dev/null 2>&1") if (-b $dev);
+ system("lvremove -f $dev >>$dbgfn 2>&1") if (-b $dev);
+ }
+}
+
+sub runPing()
+{
+ # This command generates ping output by pinging the host specified in the
+ # ping command still within @ARGV. However, if the host listed therein is
+ # a VE, the HN must be pinged instead.
+
+ # Get the host
+ my $host = shift(@ARGV);
+ my $cmd = join(' ', @ARGV);
+
+ print $dbgf ": runPing host=$host, cmd=$cmd\n";
+ # Find $host in the list of VEs
+ loadVeList();
+ my $hostname = gethostbyaddr(gethostbyname($host), AF_INET);
+ mydie "Host $host not found" if (!defined($hostname));
+ my $ve = getVeEntry('hostname', $hostname);
+ if (defined($ve)) {
+ $hostname = $ve->{'HN'};
+ mydie "HN is undefined for host $host" if (!defined($hostname));
+ $cmd =~ s/$host/$hostname/g;
+ print $dbgf ": ping request for $host remapped to HN $hostname\n";