fix for newer Linux systems

This commit is contained in:
2021-05-06 16:39:07 +02:00
parent d893694806
commit 896d910133

View File

@@ -1,12 +1,12 @@
# set EPICS according to BASE or default to 3.14.12
epicsEnvSet EPICS, R$(EPICS_RELEASE=$(BASE=3.14.12))
epicsEnvSet EPICS R$(EPICS_RELEASE=$(BASE=3.14.12))
# Start Logging
date "epicsEnvSet IOC_STARTTIME %Y-%m-%dT%H:%M:%S" > /tmp/$(IOC).starttime
date 'epicsEnvSet IOC_STARTTIME "%Y-%m-%dT%H:%M:%S"' > /tmp/$(IOC).starttime
< /tmp/$(IOC).starttime
system "rm /tmp/$(IOC).starttime"
epicsEnvSet EPICS_IOC_LOG_INET, $(EPICS_IOC_LOG_INET=gfa-syslog)
epicsEnvSet EPICS_IOC_LOG_PORT, $(EPICS_IOC_LOG_PORT=1514)
epicsEnvSet EPICS_IOC_LOG_INET $(EPICS_IOC_LOG_INET=gfa-syslog)
epicsEnvSet EPICS_IOC_LOG_PORT $(EPICS_IOC_LOG_PORT=1514)
# iocLogPrefix will fail for EPICS 3 but that's OK
iocLogPrefix "$(IOC) "
@@ -14,7 +14,9 @@ iocLogInit
errlog "starting EPICS $(EPICS) at $(IOC_STARTTIME)"
# Set up CA search lists for different networks
system "/sbin/ifconfig `/sbin/route -n|awk '/^0.0.0.0/{print $8;exit}'`|awk -F '[: ]+' -vP=epicsEnvSet -vI=IP_ADDR '/Bcast/{print P,I,$4} /broadcast/{print P,I,$3}'>/tmp/$(IOC).net"
# ip command is supported by IFC1210, Moxa (old and new), Deltatau, Zynq, NI, SL6, RHEL7, Debian10
# To test: Gigafrost, rPI
system "ip a s `ip r|awk '/^default /{print $5;exit}'`|awk -F'[/ ]+' -vP='epicsEnvSet IP_ADDR' '/inet /{print P,$3;exit}'>/tmp/$(IOC).net"
< /tmp/$(IOC).net
system "rm /tmp/$(IOC).net"
@@ -29,7 +31,7 @@ ifEnvSet $(IP_ADDR) ~129.129.137.* EPICS_CA_ADDR_LIST "129.129.130.255 129.129.1
# SwissFEL machine networks
# with directed broadcasts
ifEnvSet $(IP_ADDR) ~172.26.* EPICS_CA_ADDR_LIST "172.26.0.255 172.26.2.255 172.26.8.255 172.26.16.255 172.26.24.255 172.26.32.255 172.26.40.255 172.26.110.255 172.26.111.255 172.26.120.255 129.129.242.255 129.129.243.255"
ifEnvSet $(IP_ADDR) ~172.26.* EPICS_CA_AUTO_ADDR_LIST "NO"
ifEnvSet $(IP_ADDR) ~172.26.* EPICS_CA_AUTO_ADDR_LIST NO
# SwissFEL end stations to machine via gateway
ifEnvSet $(IP_ADDR) ~129.129.242.* EPICS_CA_ADDR_LIST sf-saresa-cagw:5062