summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Lock <josh@linux.intel.com>2010-09-03 18:27:20 +0100
committerJoshua Lock <josh@linux.intel.com>2010-09-07 10:48:21 +0100
commit13ef707ab110e9934ce1a4c30b834083cfcf95b8 (patch)
tree356f2b75d2caeccecf128d37f49fef6f4604059e
parentf57a3d950818b18782c06b0e8a653e5f7fba082a (diff)
downloadopenembedded-core-13ef707ab110e9934ce1a4c30b834083cfcf95b8.tar.gz
openembedded-core-13ef707ab110e9934ce1a4c30b834083cfcf95b8.tar.bz2
openembedded-core-13ef707ab110e9934ce1a4c30b834083cfcf95b8.tar.xz
openembedded-core-13ef707ab110e9934ce1a4c30b834083cfcf95b8.zip
runqemu-nfs: check for required programs
The unfs server requires either rpcbind or portmap to be installed and running to start so check for their presence in the script. Signed-off-by: Joshua Lock <josh@linux.intel.com>
-rwxr-xr-xscripts/runqemu-nfs17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/runqemu-nfs b/scripts/runqemu-nfs
index bccbc4c5c..79b41ca79 100755
--- a/scripts/runqemu-nfs
+++ b/scripts/runqemu-nfs
@@ -65,6 +65,23 @@ fi
PSEUDO_LOCALSTATEDIR=~/.poky-sdk/pseudo
export PSEUDO_LOCALSTATEDIR
+RPC=`which rpcbind`
+if [ "x$RPC" = "x" ]; then
+ RPC=`which portmap`
+ if [ "x$RPC" = "x" ]; then
+ echo "You need rpcbind or portmap installed and running to run the"
+ echo "userspace NFS server."
+ exit 1
+ fi
+fi
+
+rpcbind_running=`ps ax | grep rpcbind | wc -l`
+portmap_running=`ps ax | grep portbind | wc -l`
+if [ rpcbind_running == 1 -a portmap_running == 1 ]; then
+ echo "You need to be running either rpcbind or portmap to continue"
+ exit 1
+fi
+
# Start the userspace NFS server
echo "poky-export-rootfs restart $SDK_ROOTFS_DIR"
poky-export-rootfs restart $SDK_ROOTFS_DIR