#!/bin/sh

usage="$0 [OPTIONS]\n -n <nfspath>\n -s <serverip>"

while getopt "n:s:h" opt; do
	if [ ${opt} = n ]; then
		nfsroot=${OPTARG}
	elif [ ${opt} = s ]; then
		serverip=${OPTARG}
	elif [ ${opt} = h ]; then
		echo -e "$usage"
		exit 0
	fi
done

if [ -n ${serverip} ]; then
	nfsroot="$serverip:$nfsroot"
fi

global.linux.bootargs.dyn.root="root=/dev/nfs nfsroot=$nfsroot,v3,tcp"
