Re: How to add a unit path to systemd?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fr, 10.08.18 10:10, Daniel Wang (wonderfly@xxxxxxxxxx) wrote:

> > Alternatively, you actually can issue daemon reload during the
> boot process
> 
> Suppose I use a systemd service (say foo.service) to do this, is it a
> supported/recommended practice to do a daemon reload as part of a unit's
> activation (i.e., through its ExecStart)?
> I want my new units to block default.target. Is it safe to issue a
> `systemctl start default.target` with foo.service' ExecStart or
> ExecStartPost?

We generally design our stuff to not require PID 1 daemon reload as
part of the normal boot-time code paths. So no, it's not precisely
"recommended practice" to do this, but it should work OK with current
systemd versions.

(That said, the initrd *does* issue a reload after mounting the root
fs, in order to pull in some bits and pieces from the root fs — such
as the root fs' /etc/fstab — before proceeding, but I'd argue this is
a very special case, that is probably even unfortunate but kinda
unavoidable)

Lennart

-- 
Lennart Poettering, Red Hat
_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux