Skip to content

Commit 6f9cb8b

Browse files
committed
Cleanup remote command script
1 parent fa56fde commit 6f9cb8b

2 files changed

Lines changed: 7 additions & 12 deletions

File tree

server/src/main/java/org/apache/cloudstack/diagnosis/RemoteDiagnosisServiceImpl.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,6 @@ private static String setupRemoteCommand(String diagnosisType, String destinatio
104104
if (optionalArguments != null){
105105
return String.format("%s %s", diagnosisType, destinationIpAddress+" "+optionalArguments);
106106
}
107-
108107
return String.format("%s %s", diagnosisType, destinationIpAddress);
109108
}
110109

systemvm/debian/opt/cloud/bin/execute_icmp_tool_remotely.sh

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,12 @@
1717
# specific language governing permissions and limitations
1818
# under the License.
1919

20-
cmd=$1
21-
if [ $cmd == "ping" ]
22-
then
23-
$1 $2 -c 5
24-
25-
elif [ $cmd == "traceroute" ]
26-
then
27-
$1 $2
28-
20+
if [[ "$@" = *"ping"* ]]; then
21+
if [[ "$@" = *"-c"* ]]; then
22+
$@
23+
else
24+
$@ -c 5
25+
fi
2926
else
30-
echo "I am not ping or traceroute"
31-
27+
$@
3228
fi

0 commit comments

Comments
 (0)