[systemd-devel] [PATCH v4 4/4] run: introduce timer support option

WaLyong Cho walyong.cho at samsung.com
Tue Dec 2 06:38:07 PST 2014


On 12/02/2014 11:29 PM, WaLyong Cho wrote:
> Supported timer options --on-active=, --on-boot=, --on-startup=,
> --on-unit-active=, --on-unit-inactive=, --on-calendar=. Each options
> corresponding with OnActiveSec=, OnBootSec=, OnStartupSec=,
> OnUnitActiveSec=, OnUnitInactiveSec= of timer respectively.
> ---
>  man/systemd-run.xml              |  42 +++
>  src/libsystemd/sd-bus/bus-util.c |  14 +-
>  src/run/run.c                    | 583 ++++++++++++++++++++++++++++++++-------
>  3 files changed, 539 insertions(+), 100 deletions(-)
> 
> diff --git a/src/run/run.c b/src/run/run.c
> index 85eb052..03f49df 100644
> --- a/src/run/run.c
> +++ b/src/run/run.c
> @@ -551,7 +934,7 @@ static int start_transient_scope(
>  int main(int argc, char* argv[]) {
>          _cleanup_bus_error_free_ sd_bus_error error = SD_BUS_ERROR_NULL;
>          _cleanup_bus_close_unref_ sd_bus *bus = NULL;
> -        _cleanup_free_ char *description = NULL, *command = NULL;
> +        _cleanup_free_ char *description = NULL, *command = NULL, *state = NULL;

Sorry, unused valuable, please ignore this.

>          int r;
>  
>          log_parse_environment();
> @@ -588,6 +971,8 @@ int main(int argc, char* argv[]) {
>  
>          if (arg_scope)
>                  r = start_transient_scope(bus, argv + optind, &error);
> +        else if (with_timer)
> +                r = start_transient_timer(bus, argv + optind, &error);
>          else
>                  r = start_transient_service(bus, argv + optind, &error);
>  
> 


More information about the systemd-devel mailing list