28.08.2015 Views

The Design and Implementation of the Anykernel and Rump Kernels

1F3KDce

1F3KDce

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

B–29<br />

B.5.2<br />

NFS Client<br />

#!/bin/sh<br />

#<br />

# This script starts a rump kernel which contains <strong>the</strong> drivers necessary<br />

# to mount an NFS export. It <strong>the</strong>n proceeds to mount <strong>and</strong> provides<br />

# a directory listing <strong>of</strong> <strong>the</strong> mountpoint.<br />

#<br />

NFSX=/tmp/nfsx<br />

export RUMP_SERVER=unix://${NFSX}/nfscli<br />

rump.halt 2> /dev/null<br />

rump_server -lrumpvfs -lrumpnet -lrumpnet_net -lrumpnet_netinet \<br />

-lrumpnet_shmif -lrumpfs_nfs ${RUMP_SERVER}<br />

rump.ifconfig shmif0 create<br />

rump.ifconfig shmif0 linkstr ${NFSX}/shmbus<br />

rump.ifconfig shmif0 inet 10.1.1.100<br />

export LD_PRELOAD=/usr/lib/librumphijack.so<br />

mkdir /rump/mnt<br />

mount_nfs 10.1.1.1:/export /rump/mnt<br />

echo export RUMP_SERVER=unix://${NFSX}/nfscli<br />

echo export LD_PRELOAD=/usr/lib/librumphijack.so<br />

B.5.3<br />

Using it<br />

To use <strong>the</strong> NFS server, just run both scripts. <strong>The</strong> client script will print configuration<br />

data, so you can eval <strong>the</strong> script’s output in a Bourne type shell for <strong>the</strong> correct

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!