diff options
author | Joshua Lock <josh@linux.intel.com> | 2010-09-03 18:27:20 +0100 |
---|---|---|
committer | Joshua Lock <josh@linux.intel.com> | 2010-09-07 10:48:21 +0100 |
commit | 13ef707ab110e9934ce1a4c30b834083cfcf95b8 (patch) | |
tree | 356f2b75d2caeccecf128d37f49fef6f4604059e /scripts | |
parent | f57a3d950818b18782c06b0e8a653e5f7fba082a (diff) | |
download | poky-13ef707ab110e9934ce1a4c30b834083cfcf95b8.tar.gz |
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>
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/runqemu-nfs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/runqemu-nfs b/scripts/runqemu-nfs index bccbc4c5c8..79b41ca79a 100755 --- a/scripts/runqemu-nfs +++ b/scripts/runqemu-nfs | |||
@@ -65,6 +65,23 @@ fi | |||
65 | PSEUDO_LOCALSTATEDIR=~/.poky-sdk/pseudo | 65 | PSEUDO_LOCALSTATEDIR=~/.poky-sdk/pseudo |
66 | export PSEUDO_LOCALSTATEDIR | 66 | export PSEUDO_LOCALSTATEDIR |
67 | 67 | ||
68 | RPC=`which rpcbind` | ||
69 | if [ "x$RPC" = "x" ]; then | ||
70 | RPC=`which portmap` | ||
71 | if [ "x$RPC" = "x" ]; then | ||
72 | echo "You need rpcbind or portmap installed and running to run the" | ||
73 | echo "userspace NFS server." | ||
74 | exit 1 | ||
75 | fi | ||
76 | fi | ||
77 | |||
78 | rpcbind_running=`ps ax | grep rpcbind | wc -l` | ||
79 | portmap_running=`ps ax | grep portbind | wc -l` | ||
80 | if [ rpcbind_running == 1 -a portmap_running == 1 ]; then | ||
81 | echo "You need to be running either rpcbind or portmap to continue" | ||
82 | exit 1 | ||
83 | fi | ||
84 | |||
68 | # Start the userspace NFS server | 85 | # Start the userspace NFS server |
69 | echo "poky-export-rootfs restart $SDK_ROOTFS_DIR" | 86 | echo "poky-export-rootfs restart $SDK_ROOTFS_DIR" |
70 | poky-export-rootfs restart $SDK_ROOTFS_DIR | 87 | poky-export-rootfs restart $SDK_ROOTFS_DIR |