diff --git a/AutoStart/S00-install-ethercat-drvr b/AutoStart/S00-install-ethercat-drvr new file mode 100755 index 0000000..4f66b3c --- /dev/null +++ b/AutoStart/S00-install-ethercat-drvr @@ -0,0 +1,45 @@ +#!/bin/bash + +#echo "I am in ${0}" + +# skip this file for debian 10 +if [ "$EPICS_HOST_ARCH" = "deb10-x86_64" ]; then + exit +fi + +ETHCATPCKGE="/ioc/NeedfulThings/EtherCAT/install-packages/ethercat-1.6.3-$(uname -r)-drv.deb" +if [ ! -f "${ETHCATPCKGE}" ] +then + echo "${ETHCATPCKGE} does not exist" + exit +else + if [ ! -r "${ETHCATPCKGE}" ] + then + echo "${ETHCATPCKGE} is NOT readable" + exit + else + echo "Will install ${ETHCATPCKGE}" + fi +fi + +#udevadm control --log-priority=debug + +# this is probably not needed, because it did not start (package was missing) +systemctl stop ethercat # stop if already running + +# install package +dpkg -i ${ETHCATPCKGE} > /tmp/ethercat-install.log + +# service housekeeping +systemctl daemon-reload # if ethercat.service was already there +systemctl enable ethercat # if ethercat.service was not enabled + +# start ethercat service +systemctl start ethercat # start (again) + +echo "ls -l /dev/EtherCAT*"; ls -l /dev/EtherCAT* +sleep 1 +udevadm trigger # make /dev/EtherCAT* rw for all: why I need this on some systems, and on some other not +echo "ls -l /dev/EtherCAT*"; ls -l /dev/EtherCAT* +sleep 1 +echo "ls -l /dev/EtherCAT*"; ls -l /dev/EtherCAT* diff --git a/AutoStart/S10-ecmc-python-venv b/AutoStart/S10-ecmc-python-venv index 3760021..ccd7756 100755 --- a/AutoStart/S10-ecmc-python-venv +++ b/AutoStart/S10-ecmc-python-venv @@ -1,3 +1,9 @@ #!/bin/bash -cp -r /ioc/NeedfulThings/ecmc_python_venv/.venv /tmp/ +if [ "$EPICS_HOST_ARCH" = "deb10-x86_64" ]; then + cp -r /ioc/NeedfulThings/ecmc_python_venv/.venv /tmp/ +fi + +if [ "$EPICS_HOST_ARCH" = "deb12-x86_64" ]; then + cp -r /ioc/NeedfulThings/ecmc_python_venv/.venv_deb12 /tmp/.venv +fi