Skip to content

Commit ac85c46

Browse files
authored
Merge pull request #16 from chkp-yaelg/master
SmartMove update What’s new: 1. Cisco IPv6 support 2. SmartConnector: (Python) a. improved detection of sub-layers name duplications b. improved group members list handling c. improved networks with subnet-mask (IPv4 & IPv6) d. Added support for Cisco Global rules support as shared sub-policy 3. Validate max packages number for processing according to sk154435 (Error code: 2000232 )
2 parents 2533bc1 + bd2f740 commit ac85c46

File tree

19 files changed

+3218
-2645
lines changed

19 files changed

+3218
-2645
lines changed

CheckPointObjects/CLIScriptBuilder.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static string GenerateScriptFooter(string errorsReportFileName)
5252
.Append("mgmt_cli logout -s id.txt")
5353
.Append(Environment.NewLine)
5454
.Append(Environment.NewLine)
55-
.Append("if [ -f ").Append(errorsReportFileName).Append(" ]; then")
55+
.Append("if [[ -f ").Append(errorsReportFileName).Append(" ]]; then")
5656
.Append(Environment.NewLine)
5757
.Append(" echo ''")
5858
.Append(Environment.NewLine)
@@ -78,7 +78,7 @@ public static string GenerateRunCommandScript(string errorsReportFileName)
7878
.Append(Environment.NewLine)
7979
.Append(" eval $cmd > last_output.txt 2>&1")
8080
.Append(Environment.NewLine)
81-
.Append(" if [ $? -ne 0 ]; then")
81+
.Append(" if [[ $? -ne 0 ]]; then")
8282
.Append(Environment.NewLine)
8383
.Append(" echo $cmd >> ").Append(errorsReportFileName)
8484
.Append(Environment.NewLine)
@@ -103,7 +103,7 @@ public static string GenerateLoginScript(string domainName, string errorsReportF
103103
var sb = new StringBuilder();
104104
sb.Append("echo 'Logging in...'")
105105
.Append(Environment.NewLine)
106-
.Append("if [ -f ").Append(errorsReportFileName).Append(" ]; then")
106+
.Append("if [[ -f ").Append(errorsReportFileName).Append(" ]]; then")
107107
.Append(Environment.NewLine)
108108
.Append(" rm ").Append(errorsReportFileName)
109109
.Append(Environment.NewLine)
@@ -121,7 +121,7 @@ public static string GenerateLoginScript(string domainName, string errorsReportF
121121
sb.Append("mgmt_cli login -r true -d \"").Append(domainName).Append("\" -v 1.1 > id.txt").Append(Environment.NewLine);
122122
}
123123

124-
sb.Append("if [ $? -ne 0 ]; then")
124+
sb.Append("if [[ $? -ne 0 ]]; then")
125125
.Append(Environment.NewLine)
126126
.Append(" echo 'Login Failed'")
127127
.Append(Environment.NewLine)
@@ -138,7 +138,7 @@ public static string GenerateLoginScript(string domainName, string errorsReportF
138138
.Append(Environment.NewLine)
139139
.Append("DOMAINS_COUNT=$($JQ -r \".total\" domains.json)")
140140
.Append(Environment.NewLine)
141-
.Append("if [ $DOMAINS_COUNT -ne 0 ]; then")
141+
.Append("if [[ $DOMAINS_COUNT -ne 0 ]]; then")
142142
.Append(Environment.NewLine)
143143
.Append(" echo 'This script cannot be executed on MDS. Please specify a domain name in SmartMove tool.'")
144144
.Append(Environment.NewLine)

0 commit comments

Comments
 (0)