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

Change-Id: I41952d5b8ee29f109130c570e0d13ccad6970d2f
Refs: #2489
diff --git a/tools/nfd-start.sh b/tools/nfd-start.sh
index 4df12d7..4c14e07 100755
--- a/tools/nfd-start.sh
+++ b/tools/nfd-start.sh
@@ -6,7 +6,7 @@
   -h)
     echo Usage
     echo $0
-    echo "  Start NFD and RIB Management daemon"
+    echo "  Start NFD"
     exit 0
     ;;
   -V)
@@ -30,11 +30,10 @@
 }
 
 hasNFD=$(hasProcess nfd)
-hasNRD=$(hasProcess nrd)
 
-if [[ -n $hasNFD$hasNRD ]]
+if [[ -n $hasNFD ]]
 then
-  echo 'NFD or NRD is already running...'
+  echo 'NFD is already running...'
   exit 1
 fi
 
@@ -49,7 +48,10 @@
   exit 2
 fi
 
-sudo nfd &
-sleep 2
-nrd &
-sleep 2
+sudo @BINDIR@/nfd &
+
+if [ -f @SYSCONFDIR@/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
+    . @SYSCONFDIR@/ndn/nfd-init.sh
+fi