if (access("/etc/yunhai.ini",F_OK) == 0)
{
p = strchr(ip, '/');
if(p != NULL)
{
q=p+1;
*p = '\0';
}
strcpy(ip_tmp, ip);
strcat(ip_tmp,"\\/");
strcat(ip_tmp, q);
bzero(&cmd, sizeof(cmd));
snprintf(cmd, sizeof(cmd), "sed -i 's/^.*com_external_ip.*$/com_external_ip=%s/' %s", ip_tmp, "/etc/yunhai.ini");
system(cmd);
SendOneLine("Success!");
return 0;
}
SendOneLine("Fail!");
cp openstack_rpm/. zlg -rf
阅读(750) | 评论(0) | 转发(0) |