- if (!dropACLs(target)) {
- logger << "Switch::sync() - failed to drop ACLs for the switch '" << _ip << "'" << std::endl;
- return;
- }
+ {
+ std::string fileName(_ip + ".sh");
+ std::string newFileName(fileName + ".new");
+ std::ofstream script(newFileName.c_str());
+ script << "#!/bin/sh\n";
+ if (!dropACLs(target, script)) {
+ logger << "Switch::sync() - failed to drop ACLs for the switch '" << _ip << "'" << std::endl;
+ return;
+ }