You can create bootable media that acquires UpdateXpress System Pack Installer or individual updates from an NFS or Samba server.
#!/bin/sh
#
# This script prepares the current Linux environment for ToolsCenter.
export PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin:/root/bin:/usr/local|
/bin:/usr/bin:/usr/X11R6/bin:/bin:
/usr/games:/usr/lib/mit/bin:/usr/lib/mit/sbin
cp -f /toolscenter/media_check.sh /tmp/media_check.sh
chmod +x /tmp/media_check.sh
cd /toolscenter/
chmod -R +x * /dev/null 2>/dev/null
dos2unix /toolscenter/bomc.config > /dev/null 2>&1
#disable Crtl+z and Ctrl+c
trap "" 2 20
BOMC_MENU=/toolscenter/menu/show_menu.sh
BOMC_LOG_FILE=/tmp/bomc.log
BOMC_REMOTE_CHECK=/toolscenter/menu/check_remote.sh
# Export the UXSPI_TIMEOUT environment to uxspi
TIMEOUT=60
if cat bomc.config | grep IBM_SYSTEM_TIMEOUT > /dev/null 2>&1
then
TIMEOUT=`cat bomc.config | grep IBM_SYSTEM_TIMEOUT | sed 's
/IBM_SYSTEM_TIMEOUT=//'`
fi
export UXSPI_TIMEOUT=${TIMEOUT}
#Export environment for UXSPI UXSP's/latest
if cat bomc.config | grep "IBM_SYSTEM_LATEST=YES" > /dev/null 2>&1
then
export UXSPI_LATEST=1
fi
# setup a mount point
mkdir -p /bomcmount
# NFS mount (replace ¡¯192.168.196.61:/nfsboot¡¯ with your NFS server¡
¯s IP and directory)
mount -t nfs 192.168.196.61:/nfsboot /bomcmount -o unlock
# Samba mount (replace ¡¯//192.168.253.26/sambaroot¡¯ with your Samba
server¡¯s IP and
# directory)
#mount -t cifs //192.168.253.26/sambaroot /bomcmount -o user=Guest,
password=passw0rd
# SEP environment variable
export SEP_REPOSITORY_PATH=/toolscenter
export SEP_INSTALL_PATH=/tmp
# UXSPI environment variable
export UXLITE_CLEAN_INVFILE=1
export UXSPI_CLEAN_INVFILE=1
export UXSPI_BOOTABLE=/bomcmount
if [ -d /toolscenter/uxspi ]
then
export UXSPI_BINARY_PATH=`find /toolscenter/uxspi -name 'uxspi*.anyos'
| sort | tail -n 1`
else
export UXSPI_BINARY_PATH=""
fi
export UXSPI_GUI_CMD="xterm -geometry 170x59 +sb -e ${UXSPI_BINARY_PATH}"
if [ "${UXSPI_LATEST}" = "1" ]
then
export UXSPI_TUI_CMD="${UXSPI_BINARY_PATH} update --tui --firmware -l
${UXSPI_BOOTABLE}
--timeout=${UXSPI_TIMEOUT} -L"
else
export UXSPI_TUI_CMD="${UXSPI_BINARY_PATH} update --tui --firmware -l
${UXSPI_BOOTABLE}
--timeout=${UXSPI_TIMEOUT}"
fi
${BOMC_REMOTE_CHECK} /toolscenter
if [ $? -eq 0 ]; then
echo "Remote mounting via remote IMM/network" >> ${BOMC_LOG_FILE}
else
echo "NOT mounted via remote IMM/network" >> ${BOMC_LOG_FILE}
export UXSPI_REDUCE_COPY=1
fi
# DSA environment variable
export DSA_PATH=/tmp/embed:/tmp/embed/qlogic:/usr/X11R6/lib64:/usr/X11R6/lib
export DSA_GUI_CMD="xterm -geometry 170x59 +sb -e /toolscenter/dsa/start.sh --gui"
export DSA_CMD_CMD="xterm -geometry 170x59 +sb -e /toolscenter/dsa/start.sh --cmd"
#export DSA_TUI_CMD="/toolscenter/dsa/start.sh --cmd"
# Export environment for exit script command
if cat bomc.config | grep "IBM_SYSTEM_MEDIA_EJECT=NO" > /dev/null 2>&1
then
export BOMC_EXIT_CMD="/toolscenter/tcexit_noeject.sh"
else
export BOMC_EXIT_CMD="/toolscenter/tcexit.sh"
fi
# Export environment for UXSPI autorun command
if cat bomc.config | grep "IBM_SYSTEM_AUTORUN=uxspi" > /dev/null 2>&1
then
export UXSPI_AUTORUN=1
fi
# Export the unattended mode environment variable
UNATTD_FULLSTR=`cat bomc.config | grep IBM_SYSTEM_UNATTENDED | sed 's
/IBM_SYSTEM_UNATTENDED=//'`
if echo ${UNATTD_FULLSTR} | grep '[tftp://|ftp://|nfs://|smb://|usb:/]'
> /dev/null 2>&1
then
echo "Unattended mode specified by user" >> ${BOMC_LOG_FILE}
export BOMC_UNATTENDED_MODE=1
fi
if [ $# -eq 0 ]
then
echo "Running in non SOL mode" >> ${BOMC_LOG_FILE}
export DSA_TUI_CMD="/toolscenter/dsa/start.sh --cmd"
if [ "${BOMC_UNATTENDED_MODE}" = "1" ]
then
echo "Calling show_menu.sh unattended" >> ${BOMC_LOG_FILE}
${BOMC_MENU} unattended
else
echo "Calling show_menu.sh attended" >> ${BOMC_LOG_FILE}
${BOMC_MENU} attended
fi
else
if [ "$1" = "serial" ]
then
echo "Running in SOL mode - Console" >> ${BOMC_LOG_FILE}
export BOMC_SOL_MODE=1
export DSA_TUI_CMD="/toolscenter/dsa/start.sh serial --cmd"
if [ "${BOMC_UNATTENDED_MODE}" = "1" ]
then
echo "Calling show_menu.sh unattended" >> ${BOMC_LOG_FILE}
${BOMC_MENU} unattended
else
echo "Calling show_menu.sh attended" >> ${BOMC_LOG_FILE}
${BOMC_MENU} attended
fi
elif [ "$1" = "serial-on" ]
then
while [ 1 ];do
clear
echo "ToolsCenter started on SOL console......type \"reboot\"
to reboot the system"
read INPUT
if [ "${INPUT}" = "reboot" ]
then
echo "Rebooting the system ..."
${BOMC_EXIT_CMD} reboot
exit
elif [ "${INPUT}" = "r2d2" ]
then
sh
fi
done
fi
fi
# Exit ToolsCenter
echo "Using Exit Script: ${BOMC_EXIT_CMD}...."
sleep 3
if [ "${BOMC_UNATTENDED_MODE}" = "1" ]
then
# Shut down the system when it's unattended image
${BOMC_EXIT_CMD} shutdown
elif cat bomc.config | grep "IBM_SYSTEM_PXE_FILE=NULL" > /dev/null 2>&1
then
echo "Rebooting the system ..."
${BOMC_EXIT_CMD} reboot
else
# Shut down the system when it's PXE image
echo "Shut down the system ..."
${BOMC_EXIT_CMD} shutdown
fi
exit 0
ibm_utl_bomc_v.r.m_windows_i386.exe -m 8843 --cd=E: -l workingdir