From: Lennart Poettering Date: Tue, 17 Aug 2010 17:37:36 +0000 (+0200) Subject: service: rename ValidNoProcess= to RemainAfterExit= X-Git-Tag: v8~54 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02ee865a462caa2aeeee673e90287a4c34b013fd;p=systemd service: rename ValidNoProcess= to RemainAfterExit= --- diff --git a/fixme b/fixme index 101cebb2..de3543e7 100644 --- a/fixme +++ b/fixme @@ -1,6 +1,3 @@ -* ValidNoProcess= ? ContinueAfterExit=, ActiveAfterExit=, KeepAfterExit= - (after this change update udev service files) - * systemd.log_level=debug should overwrite 'quiet' ? * implicit 'default.target' ? @@ -107,6 +104,7 @@ https://bugzilla.redhat.com/show_bug.cgi?id=617317 -- acpid https://bugzilla.redhat.com/show_bug.cgi?id=617327 -- gpm https://bugzilla.redhat.com/show_bug.cgi?id=617330 -- pcsc-lite https://bugzilla.redhat.com/show_bug.cgi?id=617321 -- audit +https://bugzilla.redhat.com/show_bug.cgi?id=617316 -- abrt Regularly: diff --git a/man/systemd.service.xml b/man/systemd.service.xml index c3eebeab..c0fc9a98 100644 --- a/man/systemd.service.xml +++ b/man/systemd.service.xml @@ -164,7 +164,7 @@ to , however it is expected that the process has to exit before systemd starts follow-up - units. ValidNoProcess= + units. RemainAfterExit= is particularly useful for this type of service. @@ -205,7 +205,7 @@ - ValidNoProcess= + RemainAfterExit= Takes a boolean value that specifies whether the service diff --git a/src/dbus-service.c b/src/dbus-service.c index 608cb4fe..59222066 100644 --- a/src/dbus-service.c +++ b/src/dbus-service.c @@ -42,7 +42,7 @@ BUS_EXEC_CONTEXT_INTERFACE \ " \n" \ " \n" \ - " \n" \ + " \n" \ BUS_EXEC_STATUS_INTERFACE("ExecMain") \ " \n" \ " \n" \ @@ -86,7 +86,7 @@ DBusHandlerResult bus_service_message_handler(Unit *u, DBusConnection *connectio BUS_EXEC_CONTEXT_PROPERTIES("org.freedesktop.systemd1.Service", u->service.exec_context), { "org.freedesktop.systemd1.Service", "PermissionsStartOnly", bus_property_append_bool, "b", &u->service.permissions_start_only }, { "org.freedesktop.systemd1.Service", "RootDirectoryStartOnly", bus_property_append_bool, "b", &u->service.root_directory_start_only }, - { "org.freedesktop.systemd1.Service", "ValidNoProcess", bus_property_append_bool, "b", &u->service.valid_no_process }, + { "org.freedesktop.systemd1.Service", "RemainAfterExit", bus_property_append_bool, "b", &u->service.remain_after_exit }, BUS_EXEC_STATUS_PROPERTIES("org.freedesktop.systemd1.Service", u->service.main_exec_status, "ExecMain"), { "org.freedesktop.systemd1.Service", "MainPID", bus_property_append_pid, "u", &u->service.main_pid }, { "org.freedesktop.systemd1.Service", "ControlPID", bus_property_append_pid, "u", &u->service.control_pid }, diff --git a/src/load-fragment.c b/src/load-fragment.c index 185c0775..103e0569 100644 --- a/src/load-fragment.c +++ b/src/load-fragment.c @@ -1597,7 +1597,7 @@ static int load_from_path(Unit *u, const char *path) { { "Restart", config_parse_service_restart, &u->service.restart, "Service" }, { "PermissionsStartOnly", config_parse_bool, &u->service.permissions_start_only, "Service" }, { "RootDirectoryStartOnly", config_parse_bool, &u->service.root_directory_start_only, "Service" }, - { "ValidNoProcess", config_parse_bool, &u->service.valid_no_process, "Service" }, + { "RemainAfterExit", config_parse_bool, &u->service.remain_after_exit, "Service" }, { "SysVStartPriority", config_parse_sysv_priority, &u->service.sysv_start_priority, "Service" }, { "NonBlocking", config_parse_bool, &u->service.exec_context.non_blocking, "Service" }, { "BusName", config_parse_string_printf, &u->service.bus_name, "Service" }, diff --git a/src/service.c b/src/service.c index bc856084..ff74a6d6 100644 --- a/src/service.c +++ b/src/service.c @@ -706,7 +706,7 @@ static int service_load_sysv_path(Service *s, const char *path) { /* Special setting for all SysV services */ s->type = SERVICE_FORKING; - s->valid_no_process = true; + s->remain_after_exit = true; s->restart = SERVICE_ONCE; s->exec_context.std_output = s->meta.manager->sysv_console ? EXEC_OUTPUT_TTY : EXEC_OUTPUT_NULL; s->exec_context.kill_mode = KILL_PROCESS_GROUP; @@ -951,14 +951,14 @@ static void service_dump(Unit *u, FILE *f, const char *prefix) { "%sService State: %s\n" "%sPermissionsStartOnly: %s\n" "%sRootDirectoryStartOnly: %s\n" - "%sValidNoProcess: %s\n" + "%sRemainAfterExit: %s\n" "%sType: %s\n" "%sRestart: %s\n" "%sNotifyAccess: %s\n", prefix, service_state_to_string(s->state), prefix, yes_no(s->permissions_start_only), prefix, yes_no(s->root_directory_start_only), - prefix, yes_no(s->valid_no_process), + prefix, yes_no(s->remain_after_exit), prefix, service_type_to_string(s->type), prefix, service_restart_to_string(s->restart), prefix, notify_access_to_string(s->notify_access)); @@ -1669,7 +1669,7 @@ static void service_enter_running(Service *s, bool success) { if ((main_pid_ok > 0 || (main_pid_ok < 0 && cgroup_ok != 0)) && (s->bus_name_good || s->type != SERVICE_DBUS)) service_set_state(s, SERVICE_RUNNING); - else if (s->valid_no_process) + else if (s->remain_after_exit) service_set_state(s, SERVICE_EXITED); else service_enter_stop(s, true); diff --git a/src/service.h b/src/service.h index 3a033929..0fdcb62d 100644 --- a/src/service.h +++ b/src/service.h @@ -33,7 +33,7 @@ typedef enum ServiceState { SERVICE_START, SERVICE_START_POST, SERVICE_RUNNING, - SERVICE_EXITED, /* Nothing is running anymore, but ValidNoProcess is true, ehnce this is OK */ + SERVICE_EXITED, /* Nothing is running anymore, but RemainAfterExit is true, ehnce this is OK */ SERVICE_RELOAD, SERVICE_STOP, /* No STOP_PRE state, instead just register multiple STOP executables */ SERVICE_STOP_SIGTERM, @@ -109,7 +109,7 @@ struct Service { bool permissions_start_only; bool root_directory_start_only; - bool valid_no_process; + bool remain_after_exit; /* If we shut down, remember why */ bool failure:1; diff --git a/units/arch/halt.service b/units/arch/halt.service index dbfc2287..2079bc02 100644 --- a/units/arch/halt.service +++ b/units/arch/halt.service @@ -13,7 +13,7 @@ After=shutdown.target umount.target [Service] Type=oneshot -ValidNoProcess=yes +RemainAfterExit=yes Environment=RUNLEVEL=0 ExecStart=/etc/rc.shutdown StandardOutput=tty diff --git a/units/arch/poweroff.service b/units/arch/poweroff.service index bd563ba5..df2812fd 100644 --- a/units/arch/poweroff.service +++ b/units/arch/poweroff.service @@ -13,7 +13,7 @@ After=shutdown.target umount.target [Service] Type=oneshot -ValidNoProcess=yes +RemainAfterExit=yes Environment=RUNLEVEL=0 ExecStart=/etc/rc.shutdown StandardOutput=tty diff --git a/units/arch/rc-local.service b/units/arch/rc-local.service index 596861ac..0005e9ae 100644 --- a/units/arch/rc-local.service +++ b/units/arch/rc-local.service @@ -13,7 +13,7 @@ ExecStart=/etc/rc.local ExectStop=/etc/rc.local.shutdown TimeoutSec=0 StandardInput=tty -ValidNoProcess=yes +RemainAfterExit=yes [Install] WantedBy=multi-user.target diff --git a/units/arch/reboot.service b/units/arch/reboot.service index 6bce95d8..ae5c979e 100644 --- a/units/arch/reboot.service +++ b/units/arch/reboot.service @@ -13,7 +13,7 @@ After=shutdown.target umount.target [Service] Type=oneshot -ValidNoProcess=yes +RemainAfterExit=yes Environment=RUNLEVEL=6 ExecStart=/etc/rc.shutdown StandardOutput=tty diff --git a/units/arch/sysinit.service b/units/arch/sysinit.service index 880deccf..ae80f18e 100644 --- a/units/arch/sysinit.service +++ b/units/arch/sysinit.service @@ -16,4 +16,4 @@ ExecStart=/etc/rc.sysinit Type=forking TimeoutSec=0 StandardInput=tty -ValidNoProcess=yes +RemainAfterExit=yes diff --git a/units/fedora/halt.service b/units/fedora/halt.service index a6c4786a..c337dce6 100644 --- a/units/fedora/halt.service +++ b/units/fedora/halt.service @@ -13,7 +13,7 @@ After=shutdown.target umount.target killall.service [Service] Type=oneshot -ValidNoProcess=yes +RemainAfterExit=yes Environment=INIT_HALT=HALT RUNLEVEL=0 ExecStart=/etc/init.d/halt start StandardOutput=tty diff --git a/units/fedora/killall.service b/units/fedora/killall.service index 53c65d4a..b81b6a83 100644 --- a/units/fedora/killall.service +++ b/units/fedora/killall.service @@ -13,6 +13,6 @@ RefuseManualStart=yes [Service] Type=oneshot -ValidNoProcess=yes +RemainAfterExit=yes ExecStart=-/etc/init.d/killall start StandardOutput=tty diff --git a/units/fedora/poweroff.service b/units/fedora/poweroff.service index 7597f4f6..dbbed75d 100644 --- a/units/fedora/poweroff.service +++ b/units/fedora/poweroff.service @@ -13,7 +13,7 @@ After=shutdown.target umount.target killall.service [Service] Type=oneshot -ValidNoProcess=yes +RemainAfterExit=yes Environment=RUNLEVEL=0 ExecStart=/etc/init.d/halt start StandardOutput=tty diff --git a/units/fedora/rc-local.service b/units/fedora/rc-local.service index aff12901..90a38a01 100644 --- a/units/fedora/rc-local.service +++ b/units/fedora/rc-local.service @@ -16,7 +16,7 @@ Names=rc-local.service local.service ExecStart=/etc/rc.local start TimeoutSec=0 StandardOutput=tty -ValidNoProcess=yes +RemainAfterExit=yes SysVStartPriority=99 [Install] diff --git a/units/fedora/reboot.service b/units/fedora/reboot.service index 6120ceb8..ca8b3b18 100644 --- a/units/fedora/reboot.service +++ b/units/fedora/reboot.service @@ -13,7 +13,7 @@ After=shutdown.target umount.target killall.service [Service] Type=oneshot -ValidNoProcess=yes +RemainAfterExit=yes Environment=RUNLEVEL=6 ExecStart=/etc/init.d/reboot start StandardOutput=tty diff --git a/units/fedora/sysinit.service b/units/fedora/sysinit.service index 0c25bd25..860d3a34 100644 --- a/units/fedora/sysinit.service +++ b/units/fedora/sysinit.service @@ -16,4 +16,4 @@ ExecStart=/etc/rc.d/rc.sysinit Type=forking TimeoutSec=0 StandardInput=tty -ValidNoProcess=yes +RemainAfterExit=yes diff --git a/units/gentoo/halt.service b/units/gentoo/halt.service index 826c69f0..d97b942f 100644 --- a/units/gentoo/halt.service +++ b/units/gentoo/halt.service @@ -13,7 +13,7 @@ After=shutdown.target umount.target killall.service [Service] Type=oneshot -ValidNoProcess=yes +RemainAfterExit=yes Environment=INIT_HALT=HALT RC_DOWN_HARDDISK=yes ExecStart=/etc/init.d/shutdown.sh StandardOutput=tty diff --git a/units/gentoo/killall.service b/units/gentoo/killall.service index 8b42af87..de994d1f 100644 --- a/units/gentoo/killall.service +++ b/units/gentoo/killall.service @@ -13,6 +13,6 @@ RefuseManualStart=yes [Service] Type=oneshot -ValidNoProcess=yes +RemainAfterExit=yes ExecStart=-/etc/init.d/killprocs start StandardOutput=tty diff --git a/units/gentoo/poweroff.service b/units/gentoo/poweroff.service index 8a5a6279..2483f944 100644 --- a/units/gentoo/poweroff.service +++ b/units/gentoo/poweroff.service @@ -13,7 +13,7 @@ After=shutdown.target umount.target killall.service [Service] Type=oneshot -ValidNoProcess=yes +RemainAfterExit=yes Environment=RC_DOWN_HARDDISK=yes ExecStart=/etc/init.d/shutdown.sh StandardOutput=tty diff --git a/units/gentoo/reboot.service b/units/gentoo/reboot.service index b5defb16..8f8d7328 100644 --- a/units/gentoo/reboot.service +++ b/units/gentoo/reboot.service @@ -13,6 +13,6 @@ After=shutdown.target umount.target killall.service [Service] Type=oneshot -ValidNoProcess=yes +RemainAfterExit=yes ExecStart=/etc/init.d/reboot.sh StandardOutput=tty diff --git a/units/suse/halt.service b/units/suse/halt.service index 32b7dc20..d826ca3e 100644 --- a/units/suse/halt.service +++ b/units/suse/halt.service @@ -13,7 +13,7 @@ After=shutdown.target umount.target [Service] Type=oneshot -ValidNoProcess=yes +RemainAfterExit=yes Environment=INIT_HALT=HALT RUNLEVEL=0 COLD_BOOT=1 ExecStart=/etc/init.d/halt StandardOutput=tty diff --git a/units/suse/poweroff.service b/units/suse/poweroff.service index 13b13b04..fe8c6776 100644 --- a/units/suse/poweroff.service +++ b/units/suse/poweroff.service @@ -13,7 +13,7 @@ After=shutdown.target umount.target [Service] Type=oneshot -ValidNoProcess=yes +RemainAfterExit=yes Environment=COLD_BOOT=1 ExecStart=/etc/init.d/halt StandardOutput=tty diff --git a/units/suse/reboot.service b/units/suse/reboot.service index 3ee290e6..001d1364 100644 --- a/units/suse/reboot.service +++ b/units/suse/reboot.service @@ -13,7 +13,7 @@ After=shutdown.target umount.target [Service] Type=oneshot -ValidNoProcess=yes +RemainAfterExit=yes Environment=COLD_BOOT=1 ExecStart=/etc/init.d/reboot StandardOutput=tty diff --git a/units/var-lock.service b/units/var-lock.service index d382958a..82ba6de2 100644 --- a/units/var-lock.service +++ b/units/var-lock.service @@ -14,7 +14,7 @@ Before=local-fs.target [Service] Type=oneshot -ValidNoProcess=yes +RemainAfterExit=yes ExecStart=/bin/mkdir -p /var/lock/subsys [Install] diff --git a/units/var-run.service b/units/var-run.service index a958ff7d..38e07202 100644 --- a/units/var-run.service +++ b/units/var-run.service @@ -14,7 +14,7 @@ Before=local-fs.target [Service] Type=oneshot -ValidNoProcess=yes +RemainAfterExit=yes ExecStart=/bin/touch /var/run/utmp ; /bin/chmod 0664 /var/run/utmp ; /bin/chown root:utmp /var/run/utmp [Install]