Systemd dependencies and boot order

Dylan Klomparens asked:

I need to specify a boot order for processes to start. I have 389 Directory Server and Samba running on Fedora 18. How can I have the network services boot, then 389 DS, then Samba? Is there a GUI to manage this in Fedora?

I have enabled Samba to start with systemctl enable smb.service. I have also enabled 389 DS with systemctl enable dirsrv.target.

My answer:


Do two things:

  1. Edit the /lib/systemd/system/smb.service unit file, to specify the dependency. The [unit] section contains an After= line which specifies what services/targets should be reached before this one.

    After=syslog.target network.target nmb.service winbind.service
    

    Change it to:

    After=dirsrv.target syslog.target network.target nmb.service winbind.service
    
  2. Report this dependency back to Fedora as a bug, so that it can be incorporated in future releases.


View the full question and answer on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.