[systemd-devel] simple type service failed to be started won't effect the service requires it?
Han Pingtian
hanpt at linux.vnet.ibm.com
Tue Jun 21 14:22:14 UTC 2016
Hi,
I have a service thinkfan.service:
[Unit]
Description=simple and lightweight fan control program
After=syslog.target lm_sensors.service
[Service]
ExecStart=/usr/sbin/thinkfan -n ${OPTIONS}
Type=simple
PIDFile=/var/run/thinkfan.pid
ExecReload=/bin/kill -HUP $MAINPID
EnvironmentFile=/etc/sysconfig/thinkfan
[Install]
WantedBy=multi-user.target
And I have added "Requires=thinkfan.service" in another service
foo.service. Now there are some problems in thinkfan.service, it cannot
be started. But foo.service can be started by "systemctl start
foo.service" though I hope it would fail due to thinkfan.service's
failure.
Now if I changed the "Type=simple" to "Type=forking" in thinkfan.service,
and remove "-n" to make thinkfan running as a daemon, then foo.service
will fail to be started.
Is this a problem? Thanks in advance!
More information about the systemd-devel
mailing list