Automatic system start-up

From LNLEpicsWiki

Jump to: navigation, search

Auto-launch of programs at boot time (IOC): /etc/rc.d/rc.local

Auto-launch programs at user log-on (MEDM): System -> Preferences -> More preferences -> Sessions

---

Install procServ:

 $ cd /opt/epics
 $ mkdir procServ
 $ cd procServ
 $ wget http://www-csr.bessy.de/control/SoftDist/procServ/procServ-2.4.0.tar.gz
 $ tar -zxvf procServ-2.4.0.tar.gz
 $ cd procServ-2.4.0
 $ make

Make procServ available to anyone:

 $ su
 # cd /usr/local/bin
 # ln -s /opt/epics/procServ/procServ-2.4.0/procServ procServ
 # ls -l procServ

Give the serial port read&write privileges to the user epics: Open the User Manager: System --> Administration --> Users and Groups double click on user name epics --> Groups --> pipe uucp Check the group membership:

 $ groups epics

(The /dev/ttySI. files belong to the group called uucp, and by default, group members have read&write privileges.) check the privileges:

 $ su epics
 $ cat /dev/ttySI0

Move the top directory for PScontrols from the user area of irudolf into that of epics:

 $ su
 # cp -R /home/irudolf/top_PScontrols /home/epics 
 change the ownership of the directories:
 # cd /home/epics
 # chown -R epics:epics top_PScontrols
 change some lines in the distribution:
 $ vi iocBoot/iocPScontrolsIOC/envPaths
 epicsEnvSet("TOP","/home/irudolf/top_PScontrols")  <-- old
 epicsEnvSet("TOP","/home/epics/top_PScontrols")  <-- new
 $ vi iocBoot/iocPScontrolsIOC/st.cmd
 change every "irudolfHost" to "epicsHost" (3 entries)
 $ cd /home/epics/top_PScontrols
 $ make


Make an automatic IOC startup script in /etc/init.d/ called softIOC. Make the script executable to anyone:

 $ su
 # chmod a+x /etc/init.d/softIOC
 make a symbolic link to that script from the /etc/rc.d/rc5.d/ (runlevel 5) directory:
 # cd /etc/rc.d/rc5.d/
 # ln -s /etc/init.d/softIOC S92softIOC
 (S means "start" 92 indicates the order of loading at startup)

Make the IOC startup script to be executable:

 $ chmod a+x /home/epics/top_PScontrols/iocBoot/iocPScontrolsIOC/st.cmd


Check back whether procServ is running or not, and kill if you want:

 $ ps -Af | grep proc