daemon+rib: Merge nrd and nfd into a single process (separate threads)

Change-Id: I41952d5b8ee29f109130c570e0d13ccad6970d2f
Refs: #2489
diff --git a/contrib/upstart/nfd.conf b/contrib/upstart/nfd.conf
index 97179a2..d3673f5 100644
--- a/contrib/upstart/nfd.conf
+++ b/contrib/upstart/nfd.conf
@@ -14,4 +14,13 @@
 export HOME
 
 exec /usr/local/bin/nfd --config /usr/local/etc/ndn/nfd.conf 2>> /usr/local/var/log/ndn/nfd.log
+
+post-start script
+  if [ -f /usr/local/etc/ndn/nfd-init.sh ]; then
+      sleep 2 # post-start is executed just after nfd process starts, but there is no guarantee
+              # that all initialization has been finished
+      . /usr/local/etc/ndn/nfd-init.sh
+  fi
+end script
+
 post-stop exec sleep 2