#!/bin/sh # echo "updating NFS settings" STATE=${BASE}/etc/.NFS4inst_state.domain FILE=${BASE}/etc/default/nfs # # # # Specify the desired NFSv4 domain (ie. foo.bar) # # # VAR=NFSMAPID_DOMAIN # VALUE=foo.bar # TFILE=${FILE}.$$ # sed -e "s/^[# ]*${VAR}=.*\$/${VAR}=${VALUE}/" ${FILE} > ${TFILE} # mv ${TFILE} ${FILE} # # Set the maximum protocol version to 3 # this prevents NFSv4 from being attempted by the NFS server # VAR=NFS_SERVER_VERSMAX VALUE=3 TFILE=${FILE}.$$ sed -e "s/^[# ]*${VAR}=.*\$/${VAR}=${VALUE}/" ${FILE} > ${TFILE} mv ${TFILE} ${FILE} # # Set the maximum protocol version to 3 # this prevents NFSv4 from being attempted by the NFS client # VAR=NFS_CLIENT_VERSMAX VALUE=3 TFILE=${FILE}.$$ sed -e "s/^[# ]*${VAR}=.*\$/${VAR}=${VALUE}/" ${FILE} > ${TFILE} mv ${TFILE} ${FILE} # # Reset the permissions on the new /etc/default/nfs # file to whatever it was set to during the install # IFILE=`echo ${FILE} | sed -e "s|^${BASE}||g"` PERM=`grep "^${IFILE} e" ${BASE}/var/sadm/install/contents | (read f1 f2 f3 f4 f5 ; echo $f4)` chmod ${PERM} ${FILE} touch ${STATE} exit 0