rc script: (re)start hadcon at reboot - Old version
%begin bash%
#!/bin/sh
#
# [...] commented out code
#
if [ ! -e "/etc/localtime" ]
then
ln -s /home/hadaq/Berlin /etc/localtime
fi
/home/hadaq/ntpdate 140.181.90.22
#reset MAC address to have the same last to digits of the hostname
#P.Zumbruch, GSI, 27-02-2009
myHostname=$(hostname)
mylist='etrax042 etrax043 etrax044 etrax045 etrax046 etrax047 etrax048'
resetMACscript=/home/hadaq/resetMAC
for item in $mylist
do
if [ "$item" = "$myHostname" ]
then
[ -f ${resetMACscript} ] && ${resetMACscript} -e eth0
break;
fi
done
unset myHostname mylist item resetMACscript
#start EPICS IOC script in background
#P.Zumbruch, GSI, 28-05-2009
myHostname=$(hostname)
#mylist='etrax046 etrax047 etrax048'
mylist='etrax047 etrax048'
startBackgroundEpicsIOCScript=/home/hadaq/startBackgroundEpicsIOC.sh
for item in $mylist
do
if [ "$item" = "$myHostname" ]
then
[ ! -f ${startBackgroundEpicsIOCScript} ] && break;
export HOSTNAME=${HOSTNAME:=${myHostname}}
${startBackgroundEpicsIOCScript}
break;
fi
done
export PATH=$PATH:/home/hadaq:/home/hadaq/bin
%end%
--
PeterZumbruch - 13 Jan 2010