add support for Debian 12
templates now support Debian 10 and Debian 12
This commit is contained in:
45
AutoStart/S00-install-ethercat-drvr
Executable file
45
AutoStart/S00-install-ethercat-drvr
Executable file
@@ -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*
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user