You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ge...@apache.org on 2010/02/11 02:11:51 UTC
svn commit: r908781 - in
/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2: Alarms.cc
LocalManager.cc api2/INKMgmtAPI.cc cluster/VMap.cc tools/ConfigAPI.cc
tools/NetConfig.cc tools/SysAPI.cc tools/VIPConfig.cc
Author: georgep
Date: Thu Feb 11 01:11:35 2010
New Revision: 908781
URL: http://svn.apache.org/viewvc?rev=908781&view=rev
Log:
Second attempt at possible fix for 'dev' branch builds on buildbot(linux) after OpenSolaris fixes were applied after merge from trunk.
Modified:
incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/Alarms.cc
incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/LocalManager.cc
incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/api2/INKMgmtAPI.cc
incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/cluster/VMap.cc
incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/ConfigAPI.cc
incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/NetConfig.cc
incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/SysAPI.cc
incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/VIPConfig.cc
Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/Alarms.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/Alarms.cc?rev=908781&r1=908780&r2=908781&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/Alarms.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/Alarms.cc Thu Feb 11 01:11:35 2010
@@ -633,17 +633,9 @@
} else {
int res;
if (alarm_email_from_name && alarm_email_from_addr && alarm_email_to_addr) {
-#if (HOST_OS == freebsd) || (HOST_OS == solaris) || (HOST_OS == darwin)
- res = execl(cmd_line, alarm_bin, desc, alarm_email_from_name, alarm_email_from_addr, alarm_email_to_addr, (char *)0);
-#else
- res = execl(cmd_line, alarm_bin, desc, alarm_email_from_name, alarm_email_from_addr, alarm_email_to_addr, NULL);
-#endif
+ res = execl(cmd_line, alarm_bin, desc, alarm_email_from_name, alarm_email_from_addr, alarm_email_to_addr, (char*)NULL);
} else {
-#if (HOST_OS == freebsd) || (HOST_OS == solaris) || (HOST_OS == darwin)
- res = execl(cmd_line, alarm_bin, desc, (char *)0);
-#else
- res = execl(cmd_line, alarm_bin, desc, NULL);
-#endif
+ res = execl(cmd_line, alarm_bin, desc, (char*)NULL);
}
_exit(res);
}
Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/LocalManager.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/LocalManager.cc?rev=908781&r1=908780&r2=908781&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/LocalManager.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/LocalManager.cc Thu Feb 11 01:11:35 2010
@@ -1142,11 +1142,7 @@
Debug("lm-filter", "[LocalManager::startProxy] " "%s execution completed\n", absolute_convert_binary);
}
} else { // invoke the converter script - no args
-#if (HOST_OS == freebsd) || (HOST_OS == solaris) || (HOST_OS == darwin)
- int res = execl(absolute_convert_binary, convert_bin, NULL, (char *)0);
-#else
- int res = execl(absolute_convert_binary, convert_bin, NULL, NULL);
-#endif
+ int res = execl(absolute_convert_binary, convert_bin, NULL, (char*)NULL);
if (res < 0) {
mgmt_elog(stderr, "[LocalManager::startProxy] "
"%s failed to execute successfully.", absolute_convert_binary);
@@ -1211,11 +1207,7 @@
char env_prep_bin[1024];
snprintf(env_prep_bin, sizeof(env_prep_bin), "%s/%s", bin_path, env_prep);
-#if (HOST_OS == freebsd) || (HOST_OS == solaris) || (HOST_OS == darwin)
- res = execl(env_prep_bin, env_prep, (char *)0);
-#else
- res = execl(env_prep_bin, env_prep, NULL);
-#endif
+ res = execl(env_prep_bin, env_prep, (char*)NULL);
_exit(res);
}
}
Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/api2/INKMgmtAPI.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/api2/INKMgmtAPI.cc?rev=908781&r1=908780&r2=908781&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/api2/INKMgmtAPI.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/api2/INKMgmtAPI.cc Thu Feb 11 01:11:35 2010
@@ -3282,7 +3282,7 @@
wait(&status);
} else {
int res;
- res = execl(mv_binary, "mv", rmserver_path1, rmserver_path, NULL);
+ res = execl(mv_binary, "mv", rmserver_path1, rmserver_path, (char*)NULL);
if (res != 0) {
perror("[rm_change_ip] mv of rmserver.cfg failed! ");
}
@@ -3378,7 +3378,7 @@
wait(&status);
} else { /* Exec the up */
int res;
- res = execl(mv_binary, "mv", rmserver_path1, rmserver_path, NULL);
+ res = execl(mv_binary, "mv", rmserver_path1, rmserver_path, (char*)NULL);
if (res != 0) {
perror("[rm_remove_ip] mv of rmserver.cfg failed! ");
}
@@ -3501,7 +3501,7 @@
wait(&status);
} else { /* Exec the up */
int res;
- res = execl(mv_binary, "mv", rmserver_path1, rmserver_path, NULL);
+ res = execl(mv_binary, "mv", rmserver_path1, rmserver_path, (char*)NULL);
if (res != 0) {
perror("[rm_change_hostname] mv of rmserver.cfg failed! ");
}
Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/cluster/VMap.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/cluster/VMap.cc?rev=908781&r1=908780&r2=908781&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/cluster/VMap.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/cluster/VMap.cc Thu Feb 11 01:11:35 2010
@@ -1092,10 +1092,8 @@
interface = ((VIPInfo *) hash_value)->interface;
sub_id = ((VIPInfo *) hash_value)->sub_interface_id;
-#if (HOST_OS == linux)
+#if (HOST_OS == linux) || (HOST_OS == freebsd) || (HOST_OS == solaris) || (HOST_OS == darwin)
res = execl(absolute_vipconf_binary, vip_conf, "up", virt_ip, "/sbin/ifconfig", interface, sub_id, (char*) NULL);
-#elif (HOST_OS == freebsd) || (HOST_OS == solaris) || (HOST_OS == darwin)
- res = execl(absolute_vipconf_binary, vip_conf, "up", virt_ip, "/sbin/ifconfig", interface, sub_id, (char *)0);
#else
res = execl(absolute_vipconf_binary, vip_conf, "up", virt_ip, "/usr/sbin/ifconfig", interface, sub_id, NULL);
#endif
@@ -1150,10 +1148,8 @@
interface = ((VIPInfo *) hash_value)->interface;
sub_id = ((VIPInfo *) hash_value)->sub_interface_id;
-#if (HOST_OS == linux)
+#if (HOST_OS == linux)|| (HOST_OS == freebsd) || (HOST_OS == solaris) || (HOST_OS == darwin)
res = execl(absolute_vipconf_binary, vip_conf, "down", virt_ip, "/sbin/ifconfig", interface, sub_id, (char*)NULL);
-#elif (HOST_OS == freebsd) || (HOST_OS == solaris) || (HOST_OS == darwin)
- res = execl(absolute_vipconf_binary, vip_conf, "down", virt_ip, "/sbin/ifconfig", interface, sub_id, (char *)0);
#else
res = execl(absolute_vipconf_binary, vip_conf, "down", virt_ip, "/usr/sbin/ifconfig", interface, sub_id, NULL);
#endif
Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/ConfigAPI.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/ConfigAPI.cc?rev=908781&r1=908780&r2=908781&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/ConfigAPI.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/ConfigAPI.cc Thu Feb 11 01:11:35 2010
@@ -1387,12 +1387,7 @@
return 1;
}
} else {
-
-#if (HOST_OS == freebsd) || (HOST_OS == darwin) || (HOST_OS == solaris)
- int res = execl(net_floppy_config,"net_floppy_config","done",(char *)0);
-#else
- int res = execl(net_floppy_config,"net_floppy_config","done",NULL);
-#endif
+ int res = execl(net_floppy_config,"net_floppy_config","done",(char*)NULL);
return res;
}
@@ -1466,11 +1461,7 @@
return 1;
}
} else {
-#if (HOST_OS == freebsd) || (HOST_OS == darwin) || (HOST_OS == solaris)
- int res = execl(net_floppy_config,"net_floppy_config","do", (char *)0);
-#else
- int res = execl(net_floppy_config,"net_floppy_config","do", NULL);
-#endif
+ int res = execl(net_floppy_config,"net_floppy_config","do", (char*)NULL);
return res;
}
Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/NetConfig.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/NetConfig.cc?rev=908781&r1=908780&r2=908781&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/NetConfig.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/NetConfig.cc Thu Feb 11 01:11:35 2010
@@ -1508,7 +1508,7 @@
} else if (pid > 0) {
wait(&status);
} else {
- int res = execl(ifconfig_binary, "ifconfig", nic_name, "down", NULL);
+ int res = execl(ifconfig_binary, "ifconfig", nic_name, "down", (char*)NULL);
if (res != 0) {
perror("[net_confg] couldn't bring interface down");
}
@@ -1522,7 +1522,7 @@
} else if (pid > 0) {
wait(&status);
} else {
- int res = execl(rmmod_binary, "rmmod", modname, NULL);
+ int res = execl(rmmod_binary, "rmmod", modname, (char*)NULL);
if (res != 0) {
perror("[net_confg] couldn't rmmod the ethernet driver");
}
@@ -1536,7 +1536,7 @@
} else if (pid > 0) {
wait(&status);
} else {
- int res = execl(insmod_binary, "insmod", modname, options, NULL);
+ int res = execl(insmod_binary, "insmod", modname, options, (char*)NULL);
if (res != 0) {
perror("[net_confg] couldn't insmod the ethernet driver");
}
@@ -1550,7 +1550,7 @@
wait(&status);
} else {
//trying something a bit different
- int res = execl("/etc/rc.d/init.d/network", "network", "start", NULL);
+ int res = execl("/etc/rc.d/init.d/network", "network", "start", (char*)NULL);
//int res = execl(ifconfig_binary, "ifconfig", nic_name, "up", NULL);
if (res != 0) {
perror("[net_confg] couldn't bring interface up");
@@ -1613,7 +1613,7 @@
wait(&status);
} else {
int res;
- res = execl(mv_binary, "mv", module_path_new, module_path, NULL);
+ res = execl(mv_binary, "mv", module_path_new, module_path, (char*)NULL);
if (res != 0) {
perror("[net_config] mv of new module config file failed ");
}
@@ -1960,11 +1960,7 @@
} else {
int res;
//printf("!! overwriteFiles mv %s %s\n", source, dest);
-#if (HOST_OS == solaris)
- res = execl(MV_BINARY, "mv", source, dest, (char*)0);
-#else
- res = execl(MV_BINARY, "mv", source, dest, NULL);
-#endif
+ res = execl(MV_BINARY, "mv", source, dest, (char*)NULL);
if (res != 0)
perror(errmsg);
_exit(res);
@@ -1986,11 +1982,7 @@
waitpid(pid, &status, 0);
} else {
int res;
-#if (HOST_OS == solaris)
- res = execl(SYMBOLIC_LINK_BINARY, "ln", "-s", original_file, symbolic_link, (char*)0);
-#else
- res = execl(SYMBOLIC_LINK_BINARY, "ln", "-s", original_file, symbolic_link, NULL);
-#endif
+ res = execl(SYMBOLIC_LINK_BINARY, "ln", "-s", original_file, symbolic_link, (char*)NULL);
if (res != 0)
perror(errmsg);
_exit(res);
@@ -2014,11 +2006,7 @@
waitpid(pid, &status, 0);
} else {
int res;
-#if (HOST_OS == solaris)
- res = execl(CHMOD_BINARY, "chmod", mode, filename, (char*)0);
-#else
- res = execl(CHMOD_BINARY, "chmod", mode, filename, NULL);
-#endif
+ res = execl(CHMOD_BINARY, "chmod", mode, filename, (char*)NULL);
if (res != 0)
perror(errmsg);
_exit(res);
@@ -2043,11 +2031,7 @@
waitpid(pid, &status, 0);
} else {
int res;
-#if (HOST_OS == solaris)
- res = execl(ROUTE_BINARY, "route", "delete", dest, gateway, (char*)0);
-#else
- res = execl(ROUTE_BINARY, "route", "delete", dest, gateway, NULL);
-#endif
+ res = execl(ROUTE_BINARY, "route", "delete", dest, gateway, (char*)NULL);
if (res != 0) {
perror(errmsg);
}
@@ -2073,11 +2057,7 @@
waitpid(pid, &status, 0);
} else {
int res;
-#if (HOST_OS == solaris)
- res = execl(ROUTE_BINARY, "route", "delete", dest, gateway, "-ifp", interface, (char*)0);
-#else
- res = execl(ROUTE_BINARY, "route", "delete", dest, gateway, "-ifp", interface, NULL);
-#endif
+ res = execl(ROUTE_BINARY, "route", "delete", dest, gateway, "-ifp", interface, (char*)NULL);
if (res != 0) {
perror(errmsg);
}
@@ -2100,11 +2080,7 @@
} else if (pid > 0) {
waitpid(pid, &status, 0);
} else {
-#if (HOST_OS == solaris)
- int res = execl(ROUTE_BINARY, "route", "add", dest, gateway, (char*)0);
-#else
- int res = execl(ROUTE_BINARY, "route", "add", dest, gateway, NULL);
-#endif
+ int res = execl(ROUTE_BINARY, "route", "add", dest, gateway, (char*)NULL);
if (res != 0) {
perror(errmsg);
}
@@ -2130,11 +2106,7 @@
waitpid(pid, &status, 0);
} else {
int res;
-#if (HOST_OS == solaris)
- res = execl(ROUTE_BINARY, "route", "add", dest, gateway, "-ifp", interface, (char*)0);
-#else
- res = execl(ROUTE_BINARY, "route", "add", dest, gateway, "-ifp", interface, NULL);
-#endif
+ res = execl(ROUTE_BINARY, "route", "add", dest, gateway, "-ifp", interface, (char*)NULL);
if (res != 0) {
perror(errmsg);
}
@@ -2160,11 +2132,7 @@
waitpid(pid, &status, 0);
} else { // also update the broadcast address field
int res;
-#if (HOST_OS == solaris)
- res = execl(IF_CONFIG_BINARY, "ifconfig", interface, ip, "netmask", mask, "broadcast", "+", (char*)0);
-#else
- res = execl(IF_CONFIG_BINARY, "ifconfig", interface, ip, "netmask", mask, "broadcast", "+", NULL);
-#endif
+ res = execl(IF_CONFIG_BINARY, "ifconfig", interface, ip, "netmask", mask, "broadcast", "+", (char*)NULL);
if (res != 0) {
perror(errmsg);
}
@@ -2581,7 +2549,7 @@
} else if (pid > 0) {
waitpid(pid, &status, 0);
} else {
- int res = execl(IF_CONFIG_BINARY, "ifconfig", nic_name, "up", (char*)0);
+ int res = execl(IF_CONFIG_BINARY, "ifconfig", nic_name, "up", (char*)NULL);
if (res != 0)
perror(errmsg);
_exit(res);
@@ -2595,7 +2563,7 @@
waitpid(pid, &status, 0);
} else {
int res;
- res = execl(IF_CONFIG_BINARY, "ifconfig", nic_name, "plumb", (char*)0);
+ res = execl(IF_CONFIG_BINARY, "ifconfig", nic_name, "plumb", (char*)NULL);
if (res != 0)
perror(errmsg);
_exit(res);
@@ -2624,7 +2592,7 @@
waitpid(pid, &status, 0);
} else {
int res;
- res = execl(STATIC_ROUTE_FILENAME, NULL, (char*)0);
+ res = execl(STATIC_ROUTE_FILENAME, NULL, (char*)NULL);
if (res != 0)
perror(errmsg);
_exit(res);
@@ -2672,7 +2640,7 @@
} else if (pid > 0) {
waitpid(pid, &status, 0);
} else {
- int res = execl(IFCONFIG, "ifconfig", nic_name, "auto-dhcp", "drop", (char*)0);
+ int res = execl(IFCONFIG, "ifconfig", nic_name, "auto-dhcp", "drop", (char*)NULL);
if (res != 0) {
perror(errmsg);
}
@@ -2827,7 +2795,7 @@
} else if (pid > 0) {
waitpid(pid, &status, 0);
} else {
- int res = execl(ifconfig_binary, "ifconfig", nic_name, "down", (char*)0);
+ int res = execl(ifconfig_binary, "ifconfig", nic_name, "down", (char*)NULL);
if (res != 0) {
perror("[net_confg] couldn't bring interface down");
}
@@ -2899,7 +2867,7 @@
waitpid(pid, &status, 0);
} else {
// printf("MV: %s %s %s \n",mv_binary,mrtg_path_new, mrtg_path);
- res = execl(mv_binary, "mv", mrtg_path_new, mrtg_path, (char*)0);
+ res = execl(mv_binary, "mv", mrtg_path_new, mrtg_path, (char*)NULL);
if (res != 0) {
perror("[net_config] mv of new mrtg file failed ");
}
@@ -3148,7 +3116,7 @@
waitpid(pid, &status, 0);
} else {
int res;
- res = execl(mv_binary, "mv", dns_path_new, dns_path, (char*)0);
+ res = execl(mv_binary, "mv", dns_path_new, dns_path, (char*)NULL);
if (res != 0) {
perror("[net_config] mv of new dns config file failed ");
}
@@ -3206,7 +3174,7 @@
waitpid(pid, &status, 0);
} else {
int res;
- res = execl(mv_binary, "mv", domain_path_new, domain_path, (char*)0);
+ res = execl(mv_binary, "mv", domain_path_new, domain_path, (char*)NULL);
if (res != 0) {
perror("[net_config] mv of new domain config file failed ");
}
@@ -3262,7 +3230,7 @@
waitpid(pid, &status, 0);
} else {
int res;
- res = execl(mv_binary, "mv", search_domain_path_new, search_domain_path, (char*)0);
+ res = execl(mv_binary, "mv", search_domain_path_new, search_domain_path, (char*)NULL);
if (res != 0) {
perror("[net_config] mv of new search domain config file failed ");
}
@@ -3410,7 +3378,7 @@
} else if (pid > 0) {
waitpid(pid, &status, 0);
} else {
- int res = execl(ifconfig_binary, "ifconfig", nic_name, "down", NULL);
+ int res = execl(ifconfig_binary, "ifconfig", nic_name, "down", (char*)NULL);
if (res != 0) {
perror("[net_confg] couldn't bring interface down");
}
@@ -3424,7 +3392,7 @@
} else if (pid > 0) {
waitpid(pid, &status, 0);
} else {
- int res = execl(rmmod_binary, "rmmod", modname, NULL);
+ int res = execl(rmmod_binary, "rmmod", modname, (char*)NULL);
if (res != 0) {
perror("[net_confg] couldn't rmmod the ethernet driver");
}
@@ -3438,7 +3406,7 @@
} else if (pid > 0) {
waitpid(pid, &status, 0);
} else {
- int res = execl(insmod_binary, "insmod", modname, options, NULL);
+ int res = execl(insmod_binary, "insmod", modname, options, (char*)NULL);
if (res != 0) {
perror("[net_confg] couldn't insmod the ethernet driver");
}
@@ -3452,7 +3420,7 @@
waitpid(pid, &status, 0);
} else {
//trying something a bit different
- int res = execl("/etc/rc.d/init.d/network", "network", "start", NULL);
+ int res = execl("/etc/rc.d/init.d/network", "network", "start", (char*)NULL);
//int res = execl(ifconfig_binary, "ifconfig", nic_name, "up", NULL);
if (res != 0) {
perror("[net_confg] couldn't bring interface up");
@@ -3515,7 +3483,7 @@
waitpid(pid, &status, 0);
} else {
int res;
- res = execl(mv_binary, "mv", module_path_new, module_path, NULL);
+ res = execl(mv_binary, "mv", module_path_new, module_path, (char*)NULL);
if (res != 0) {
perror("[net_config] mv of new module config file failed ");
}
Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/SysAPI.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/SysAPI.cc?rev=908781&r1=908780&r2=908781&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/SysAPI.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/SysAPI.cc Thu Feb 11 01:11:35 2010
@@ -1594,11 +1594,7 @@
}
} else {
int res;
-#if (HOST_OS ==freebsd) || (HOST_OS == darwin)
- res = execl(mv_binary, "mv", snmp_path_new, snmp_path, (char *)0);
-#else
- res = execl(mv_binary, "mv", snmp_path_new, snmp_path, NULL);
-#endif
+ res = execl(mv_binary, "mv", snmp_path_new, snmp_path, (char*)NULL);
if (res != 0) {
DPRINTF(("[SysAPI] mv of new snmp cfg file failed\n"));
}
@@ -1611,11 +1607,7 @@
wait(&status);
} else {
int res;
-#if (HOST_OS == freebsd) || (HOST_OS == darwin)
- res = execl(mv_binary, "mv", ts_snmp_path_new, ts_snmp_path, (char *)0);
-#else
- res = execl(mv_binary, "mv", ts_snmp_path_new, ts_snmp_path, NULL);
-#endif
+ res = execl(mv_binary, "mv", ts_snmp_path_new, ts_snmp_path, (char*)NULL);
if (res != 0) {
DPRINTF(("[SysAPI] mv of new ts_snmp cfg file failed\n"));
}
@@ -1670,11 +1662,7 @@
wait(&status);
} else {
int res;
-#if (HOST_OS == freebsd) || (HOST_OS == darwin)
- res = execl(mv_binary, "mv", snmp_pass_new, snmp_pass, (char *)0);
-#else
- res = execl(mv_binary, "mv", snmp_pass_new, snmp_pass, NULL);
-#endif
+ res = execl(mv_binary, "mv", snmp_pass_new, snmp_pass, (char*)NULL);
if (res != 0) {
DPRINTF(("[SysAPI] mv of new snmpass.sh file failed\n"));
}
Modified: incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/VIPConfig.cc
URL: http://svn.apache.org/viewvc/incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/VIPConfig.cc?rev=908781&r1=908780&r2=908781&view=diff
==============================================================================
--- incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/VIPConfig.cc (original)
+++ incubator/trafficserver/traffic/branches/dev/proxy/mgmt2/tools/VIPConfig.cc Thu Feb 11 01:11:35 2010
@@ -210,11 +210,7 @@
} else if (pid > 0) {
wait(&status);
} else { /* Exec the up */
-#if (HOST_OS == freebsd) || (HOST_OS == solaris)
- int res = execl(binary, "ifconfig", interface, "up", (char *)0);
-#else
- int res = execl(binary, "ifconfig", interface, "up", NULL);
-#endif
+ int res = execl(binary, "ifconfig", interface, "up", (char*)NULL);
if (res != 0) {
perror("[vip_confg] ");
}
@@ -227,11 +223,7 @@
// "netmask +" is broken on Solaris 2.6 & 2.7,
// it never actually checks against /etc/netmasks.
-#if (HOST_OS == freebsd) || (HOST_OS == solaris)
- int res = execl(binary, "ifconfig", interface, vip, "netmask", "+", "broadcast", "+", "metric", "1", (char *)0);
-#else
- int res = execl(binary, "ifconfig", interface, vip, "netmask", "+", "broadcast", "+", "metric", "1", NULL);
-#endif
+ int res = execl(binary, "ifconfig", interface, vip, "netmask", "+", "broadcast", "+", "metric", "1", (char*)NULL);
if (res != 0) {
perror("[vip_config] ");
}
@@ -302,11 +294,7 @@
} else if (pid > 0) {
wait(&status);
} else { /* Exec the remove */
-#if (HOST_OS == freebsd) || (HOST_OS == solaris)
- int res = execl(binary, "ifconfig", interface, "inet", "0.0.0.0", (char *)0);
-#else
- int res = execl(binary, "ifconfig", interface, "inet", "0.0.0.0", NULL);
-#endif
+ int res = execl(binary, "ifconfig", interface, "inet", "0.0.0.0", (char*)NULL);
if (res != 0) {
perror("[vip_confg] ");
}
@@ -318,11 +306,7 @@
} else { /* Exec the down */
int res = 0;
// don't down the inter on linux, it'll shutdown the driver
-#if (HOST_OS == freebsd) || (HOST_OS == solaris)
- res = execl(binary, "ifconfig", interface, "down", (char *)0);
-#else
- res = execl(binary, "ifconfig", interface, "down", NULL);
-#endif
+ res = execl(binary, "ifconfig", interface, "down", (char*)NULL);
if (res != 0) {
perror("[vip_confg] ");
}