The NFSv4 Finish script

A sample script is delivered as part of the JumpStart sample files in the CD's s0/Solaris_l0/Misc/jumpstart_sample directory. This finish script allows the user to specify the NFS4 domain, within the script, and have the sysidcfg finish.sh script call it.

The provided script sets the NFSMAPID_DOMAIN setting in /etc/default/nfs and create the /etc/.NFS4inst_state.domain state file.

Upon first system boot, sysidnfs4 is executed by sysidconfig as explained above, but the existence of the state file prevents any further prompts for the name of the NFSv4 domain.

The NFSv4 finish script (edited for brevity) is shown below:

# cat /cdrom/cdrom0/s0/Solaris_10/Misc/jumpstart_sample/set_nfs4_domain

echo "setting NFSv4 domain"

NFS4_DOMAIN=foo.bar

FILE=/a/etc/default/nfs STATE=/a/etc/.NFS4inst_state.domain VAR=NFSMAPID_DOMAIN VALUE=${NFS4_DOMAIN}

sed -e "s/"#[ ]*${var}=.*\$/${var}=${value}/" ${file} > ${tfile}

PERM='grep "^${ifile} e" /a/var/sadm/install/contents |

(read f1 f2 f3 f4 f5 ; echo $f4)x chmod ${PERM} ${FILE}

touch ${STATE} exit 0

0 0

Post a comment

  • Receive news updates via email from this site