Epics@GSI Webhome

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
  • rc: rc script (old)
Topic revision: r2 - 2010-01-13, PeterZumbruch - This page was cached on 2024-12-19 - 20:10.

This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding GSI Wiki? Send feedback | Legal notice | Privacy Policy (german)