* tunneling and relaying of packets of any protocol.
*
*
- * Copyright (C) 2007-2008 Othmar Gsenger, Erwin Nindl,
+ * Copyright (C) 2007-2009 Othmar Gsenger, Erwin Nindl,
* Christian Pointner <satp@wirdorange.org>
*
* This file is part of Anytun.
*
* Anytun is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * any later version.
*
* Anytun is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* along with anytun. If not, see <http://www.gnu.org/licenses/>.
*/
+#include <boost/bind.hpp>
+#include <boost/thread.hpp>
+#include <boost/assign.hpp>
#include <iostream>
#include <fstream>
-
-#include <boost/bind.hpp>
-#include <cerrno> // for ENOMEM
-
#include "datatypes.h"
#include "log.h"
#include "cryptinit.hpp"
#include "daemon.hpp"
-#include "sysexec.hpp"
+#include "sysExec.h"
bool disableRouting = false;
do_chroot(gOpt.getChrootDir());
}
catch(const std::runtime_error& e) {
- cLog.msg(Log::PRIO_WARNING) << "ignroing chroot error: " << e.what();
+ cLog.msg(Log::PRIO_WARNING) << "ignoring chroot error: " << e.what();
}
}
#ifndef NO_PRIVDROP
#ifndef NO_EXEC
if(gOpt.getPostUpScript() != "") {
cLog.msg(Log::PRIO_NOTICE) << "executing post-up script '" << gOpt.getPostUpScript() << "'";
- execScript(gOpt.getPostUpScript(), dev.getActualName(), dev.getActualNode());
+ StringVector args = boost::assign::list_of(dev.getActualName())(dev.getActualNode());
+ anytun_exec(gOpt.getPostUpScript(), args);
}
#endif