logo       

TS hostname from file and thinstation.runtime.: msg#00103

network.thinstation.devel

Subject: TS hostname from file and thinstation.runtime.

hi!

there is a function for /etc/rc.d/network which reads filename from file
located in /tmnp/mnt/duasc0/part1/hostname and set these name as hostname for
TS. It should be call before get_hostname function.

#
# function start
#
get_hostname_from_file()
{

. $TS_GLOBAL

FILE_WITH_HOSTNAME="/tmp/mnt/disc0/part1/hostname"
#FILE_WITH_HOSTNAME="./hostname"

echo -e "\tReading hostname from file..."

if [ -r $FILE_WITH_HOSTNAME ] ; then
HOSTNAME_FROM_FILE=`cat $FILE_WITH_HOSTNAME`
if [ -z $HOSTNAME_FROM_FILE ] ; then
echo -e "\t\t...file exists but is empty. Not set."
else
echo -e "\t\t...setting hostname from file to: $HOSTNAME_FROM_FILE"
echo "CLIENT_NAME=$HOSTNAME_FROM_FILE" >> $TS_RUNTIME
fi
else
echo -e "\t\t...there is no file with hostname value."
fi

}

#
# function end
#


In /etc/rc.d/network there is a few places where CLIENT_NAME variable is
writing to $TS_RUNTIME (/tmp/etc/thinstation.runtime). I think, it should be
only one place where the CLEINT_NAME is set in this file.
Is anybody who knows which CLIENT_NAME variable in thinstation.runtime is
valid?



--
Dariusz PAWLAK








<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise