#!/bin/sh # Assisted Add Install Client Version 1.0.2 echo "Welcome to the Assisted Add Install Client Setup" echo "" echo "You may leave any option except the platform group blank" echo "" AICDONE=0 while [ $AICDONE != 1 ]; do CLIENTDONE=0 while [ $CLIENTDONE != 1 ]; do echo "" echo "Will this machine boot with DHCP IP and NFS pathing info? [y/n]" read CL_ISDHCP if [ "${CL_ISDHCP}" = "n" -o "${CL_ISDHCP}" = "no" ]; then echo "Will this be booted as a DHCP machine once JumpStart completes? [y/n]" echo "(will use UberJS-SBC to write network_interface=PRIMARY { DHCP ipv6=no } )" read CL_ISUBERDHCP if [ "${CL_ISUBERDHCP}" = "yes" -o "${CL_ISUBERDHCP}" = "y" ]; then CL_ISUBERDHCP="yes" else CL_ISUBERDHCP="no" echo "" echo "Enter the IP Address for the machine:" read CL_IPADDR fi fi echo "" echo "Enter the MAC Address for the machine:" read CL_MACADDR echo "" echo "Enter the NFS Install path:" read CL_NFSINST echo "" echo "Enter the NFS Install Config path:" read CL_NFSINSTCONFIG echo "" echo "Enter the NFS Sysid Config path:" read CL_NFSSYSIDCONFIG #echo "" #echo "Enter the install boot image path: (usually /)" #read CL_INSTIMAGE CL_INSTIMAGE="/" #echo "" #echo "Enter the boot file name:" #read CL_BOOTFILE CL_BOOTFILE="" echo "" echo "Enter the client name:" read CL_CLIENTNAME echo "" echo "Enter the boot architecture (sun4m/sun4u/sun4us):" read CL_ARCH echo "" echo "Configuration will be as follows" if [ "${CL_ISUBERDHCP}" = "y" -o "${CL_ISUBERDHCP}" = "yes" ]; then CMDSTRING="" echo "UberJS DHCP: ${CL_ISUBERDHCP}" fi if [ "${CL_ISDHCP}" = "y" -o "${CL_ISDHCP}" = "yes" ]; then CMDSTRING="-d" echo "Jumpstart DHCP: ${CL_ISDHCP}" fi if [ "${CL_IPADDR}" != "" ]; then echo "IP: ${CL_IPADDR}" CMDSTRING="-i ${CL_IPADDR}" fi if [ "${CL_MACADDR}" != "" ]; then echo "MAC: ${CL_MACADDR}" CMDSTRING="${CMDSTRING} -e ${CL_MACADDR}" fi if [ "${CL_NFSINST}" != "" ]; then echo "NFS Install: ${CL_NFSINST}" CMDSTRING="${CMDSTRING} -s ${CL_NFSINST}" fi if [ "${CL_NFSINSTCONFIG}" != "" ]; then echo "NFS Inst Config: ${CL_NFSINSTCONFIG}" CMDSTRING="${CMDSTRING} -c ${CL_NFSINSTCONFIG}" fi if [ "${CL_NFSSYSIDCONFIG}" != "" ]; then echo "NFS Sysid Cfg: ${CL_NFSSYSIDCONFIG}" CMDSTRING="${CMDSTRING} -p ${CL_NFSSYSIDCONFIG}" fi if [ "${CL_INSTIMAGE}" != "" ]; then echo "Install Image: ${CL_INSTIMAGE}" CMDSTRING="${CMDSTRING} -t ${CL_INSTIMAGE}" fi if [ "${CL_BOOTFILE}" != "" ]; then echo "Boot file: ${CL_BOOTFILE}" CMDSTRING="${CMDSTRING} -f ${CL_BOOTFILE}" fi if [ "${CL_CLIENTNAME}" != "" ]; then echo "Client Name: ${CL_CLIENTNAME}" CMDSTRING="${CMDSTRING} ${CL_CLIENTNAME}" fi echo "Architecture: ${CL_ARCH}" CMDSTRING="${CMDSTRING} ${CL_ARCH}" echo "" echo "Will run /InstallTools/uber-aic with options:" echo "${CMDSTRING}" echo "" echo "Is this ok? [y/n]" read YESNO if [ "${YESNO}" = "y" -o "${YESNO}" = "yes" ]; then CLIENTDONE=1 /InstallTools/uber-aic $CMDSTRING echo "Adding '${CL_CLIENTNAME} ${CL_ISUBERDHCP}' to /clientinfo/uberdhcp" echo "${CL_CLIENTNAME} ${CL_ISUBERDHCP}" >> /clientinfo/uberdhcp else echo "" fi done CORRECT=0 while [ $CORRECT != 1 ]; do echo "Done adding machines? [y/n]" read YESNO if [ "${YESNO}" = "y" -o "${YESNO}" = "yes" ]; then AICDONE=1 CORRECT=1 echo "You should be able to boot net - install the machines you added now" echo "" echo "+----------------------------------------------------------------------+" echo "| WARNING: Do not reboot this machine until all building machines have |" echo "| completed the sun install phase and rebooted |" echo "+----------------------------------------------------------------------+" echo "" elif [ "${YESNO}" = "n" -o "${YESNO}" = "no" ]; then CORRECT=1 fi done done