On Fri, 01.10.10 02:28, Gustavo Sverzut Barbieri ([email protected])
wrote:
> +++ b/src/target.c
> @@ -172,6 +172,14 @@ static int target_start(Unit *u) {
> assert(t->state == TARGET_DEAD);
>
> target_set_state(t, TARGET_ACTIVE);
> +
> + if (unit_has_name(u, SPECIAL_REBOOT_TARGET))
> + t->meta.manager->exit_code = MANAGER_REBOOT;
> + else if (unit_has_name(u, SPECIAL_POWEROFF_TARGET))
> + t->meta.manager->exit_code = MANAGER_POWEROFF;
> + else if (unit_has_name(u, SPECIAL_HALT_TARGET))
> + t->meta.manager->exit_code = MANAGER_HALT;
> +
> return 0;
> }
Please don't do this. Instead just place a normal service in these
targets that uses "systemctl" or "kill" to ask PID 1 to do the right
operation here...
Lennart
--
Lennart Poettering - Red Hat, Inc.
_______________________________________________
systemd-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/systemd-devel