大网数据广告活动
服务器运维问答

Systemd dependencies and boot order

· 52CE 我爱测

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…

问题原文

原帖链接 · Dylan Klomparens · CC BY-SA 3.0

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.

已采纳解答

原帖链接 · Guy Gangemi · CC BY-SA 4.0

Use systemctl edit smb.service to update the dependencies.

After=dirsrv.target - Will ensure the smb.service is started after dirsrv.target.

For robustness, (which will be worth while if you're tinkering with this stuff) you may also wish to include some of the following:

Requires=dirsrv.target - Activate dirsrv.target when smb.service is activated. Will cause smb.service to fail if dirsrv.target fails.

Wants=dirsrv.target - Activate dirsrv.target when smb.service is activated. Won't cause smb.service to fail if dirsrv.target fails.

BindsTo=dirsrv.target - If dirsrv.target is deactivated, deactivate smb.service.

Source: http://www.freedesktop.org/software/systemd/man/systemd.unit.html

systemd-ui provides a GUI for systemd. Gives a good view of the state of systemd but you'll still have to use a text editor to modify the unit files.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2013-02-26)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0 / CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。