[systemd-devel] [RFC] runtime configurable timer
Lennart Poettering
lennart at poettering.net
Fri Oct 24 03:19:00 PDT 2014
On Fri, 24.10.14 16:12, WaLyong Cho (walyong.cho at gmail.com) wrote:
> On 10/23/2014 12:28 AM, Lennart Poettering wrote:
> > On Thu, 11.09.14 17:45, WaLyong Cho (walyong.cho at samsung.com) wrote:
> >
> >> (I will happy there is already similar method already exist.)
> >>
> >> systemd already has similar functionality "systemd-run" but that is only
> >> for scope or service unit. I think that is useful run a service without
> >> unit file on permanent storage.
> >>
> >> As a similar method, is it possible to generate or configure timer unit
> >> on runtime?
> >
> > Currently not, but this would be certainly useful.
> >
> >> Honestly, now, I need a runtime configurable timer interface. If systemd
> >> has this then I can reduce one of daemon.
> >
> > Currently pid1's StartTransientUnit() bus call already takes four arguments
> > arguments:
> >
> > 1. a name for the unit to create and start
> > 2. a mode how to start it
> > 3. an array with properties for the unit
> > 4. an array conisting of unit names plus a property array each,
> > which is supposed to contain additional unit definitions which can
> > be referenced by the main unit you are creating.
> >
> Ok, one more question. In this case, if the timer unit is not loaded and
> service unit is already loaded then I hope to use that already loaded
> instead of new transient service unit. Then the COMMAND argument of
> systemd-run will be optional.
>
> Does it make sense?
Well, yes, it should be possible to only upload a timer unit, or a
timer and a service unit, or a just a service unit.
If you just want to upload a timer, and trigger starting of a
pre-existing service with it, then do so as primary unit, and just
leave the auxiliary array of units empty.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list