Re: Systemd unit file alias question

2011-12-15 Thread Lennart Poettering
On Mon, 21.11.11 15:37, Richard Shaw (hobbes1...@gmail.com) wrote:

 I'm working on improving how akmods are built and had an idea[1] I
 need input/confirmation on.
 
 Instead of the akmods packaging assuming when it needs to run, why
 can't each akmod driver package provide it's own unit file?
 
 Since the service would run as type oneshot, am I correct in
 assuming that no matter how many times it's started, it will only
 start for real on the first (earliest) occurrence?

No, it will start whenever somebody requests it and it isn't already
running on Type=oneshot. However, if you combine this with
RemainAfterExit=yes you get the desired behaviour.

 My idea is that each akmod driver package would provide a service file
 with the same name as the package but include an alias to
 akmods.service.

Not sure I understand this. Note that systemd will not allow aliases to
be mapped to multiple units at the same time.

 What's the consequences of multiple unit files claiming the same
 alias? Is this safe?

The first one will win, the others will result in an error message to be
printed and ignored. 

Lennart

-- 
Lennart Poettering - Red Hat, Inc.
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel

Systemd unit file alias question

2011-11-21 Thread Richard Shaw
I'm working on improving how akmods are built and had an idea[1] I
need input/confirmation on.

Instead of the akmods packaging assuming when it needs to run, why
can't each akmod driver package provide it's own unit file?

Since the service would run as type oneshot, am I correct in
assuming that no matter how many times it's started, it will only
start for real on the first (earliest) occurrence?

My idea is that each akmod driver package would provide a service file
with the same name as the package but include an alias to
akmods.service.

What's the consequences of multiple unit files claiming the same
alias? Is this safe?

Thanks,
Richard

[1] https://bugzilla.rpmfusion.org/show_bug.cgi?id=1712#c16
-- 
devel mailing list
devel@lists.fedoraproject.org
https://admin.fedoraproject.org/mailman/listinfo/devel