#!/bin/bash

. ${TOOLKIT}-functions.sh

remote_homes=`jtconf shares.nfs.remote_homes` \
	|| exit_missing_define share.nfs.remote_homes
opts=`jtconf shares.nfs.opts_client` \
	|| exit_missing_define share.nfs.opts_client



#----------------------------------------------------------------
# /etc/fstab patching (adds nfs mounts)
#----------------------------------------------------------------

outfile=fstab.tmp
orig=/etc/fstab
cp $orig $outfile || exit $?

grep -v "[ ,	]/home[ ,	]" $orig >$outfile

string="$remote_homes	/home	$opts 0 0"
echo "  fstab: adding $string"
echo "$string" >>$outfile

exit 0
