Problem description: - ./explorer[76]: HOSTID: is read only
#pwd
/opt/SUNWexplo/bin
# ./explorer
./explorer[76]: HOSTID: is read only
Solution: -
# find / -name exp_main
/opt/SUNWexplo/lib/exp_main
# file /opt/SUNWexplo/lib/exp_main
/opt/SUNWexplo/lib/exp_main: executable /bin/ksh script
# grep -i hostid /opt/SUNWexplo/lib/exp_main
# Save HOSTID
HOSTID=`hostid`
export HOSTID EXP_MAIN_VERSION
EXP_SERIAL=`eval echo $"EXP_SERIAL_${HOSTID}"`
# Translate %H to hostid
EXP_SUBJECT=`echo ${EXP_SUBJECT} | sed -e "s~%H~${HOSTID}~g"`
echo "Hostid: \c" >>${EXP_TARGET}/README
hostid >>${EXP_TARGET}/README
EXP_ID="explorer.${HOSTID}.`uname -n`-`date -u +\%Y.\%m.\%d.\%H.\%M`"
eval "EXP_SERIAL_${HOSTID}"=${exp_parms[44]}
Take backup
# cp -p /opt/SUNWexplo/lib/exp_main /opt/SUNWexplo/lib/exp_main.20090609.MUR
Comment below entry to solve this issue and then re-run the explorer script.
# vi /opt/SUNWexplo/lib/exp_main
HOSTID=`hostid`
0 comments