if (routerIp == null) {
routerIp = "none";
}
final Script command = new Script(_loadbPath, _timeout, s_logger);
command.add("-i", routerIp);
command.add("-f", cfgFile);
StringBuilder sb = new StringBuilder();
if (addRules.length > 0) {
for (int i=0; i< addRules.length; i++) {
sb.append(addRules[i]).append(',');
}
command.add("-a", sb.toString());
}
sb = new StringBuilder();
if (removeRules.length > 0) {
for (int i=0; i< removeRules.length; i++) {
sb.append(removeRules[i]).append(',');
}
command.add("-d", sb.toString());
}
sb = new StringBuilder();
if (statsRules.length > 0) {
for (int i=0; i< statsRules.length; i++) {
sb.append(statsRules[i]).append(',');
}
command.add("-s", sb.toString());
}
return command.execute();
}