Problem description: - ./explorer[76]: HOSTID: is read only

Thursday, October 8, 2009 at 4:53 AM

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`

Solaris | Powered by Blogger | Entries (RSS) | Comments (RSS) | Designed by MB Web Design | XML Coded By Cahayabiru.com