I would like to implement my own process into a CentOS7 operating system which automount an external storage (AVID ISIS for this example) at boot through systemd.
To do that, I scripted the mount procedure (because I cannot use fstab in this particular case, the avidfos command provided by AVID is needed) but I have noticed that my process failed at boot. When I run it just after the boot process manually, everything works fine.
After some reseach on systemd, I have tried to use "After=" and "Wants=" unit directives on network.target and also network-online.target but anything change.
This is a screenshot of my very simple process (without "After=" / "Wants=" directives):
[Unit]
Description=Automount ISIS storage
[Service]
Type=idle
ExecStart=/root/.SCRIPTS/automountISIS.sh
Restart=on-failure
[Install]
WantedBy=multi-users.target
Here is the ExecStart script :
mount.avidfos [ISIS-HOSTNAME]/SWAP_PULSE-IT /srv/SWAP_PULSE-IT -o credentials=/root/.CREDENTIALS/.credentialsISIS,uid=997,umask=700
My questions are :
- Are we agree than if "Wants=" / "After=" directives does not work, then it means that network.target and network-online.target are not the only services needed ?
- If yes, is there any procedure to know which processus is missing at boot ?