+
+ if(gOpt.getChrootDir() != "") {
+ try {
+ service.chroot(gOpt.getChrootDir());
+ } catch(const std::runtime_error& e) {
+ cLog.msg(Log::PRIO_WARNING) << "ignoring chroot error: " << e.what();
+ }
+ }
+ service.dropPrivs();
+
+ // this has to be called before the first thread is started
+ gSignalController.init(service);
+ gResolver.init();
+ boost::thread(boost::bind(&TunDevice::waitUntilReady,&dev));
+ if(postup_script) {
+ boost::thread(boost::bind(&SysExec::waitAndDestroy,postup_script));
+ }
+
+ initCrypto();
+