On Tue, 05.07.11 03:10, Michal Schmidt (mschm...@redhat.com) wrote: Heya,
> On Fri, 1 Jul 2011 23:17:57 +0200 Lennart Poettering wrote: > > The problem here is that apache is a SysV init script, and for those > > it is not really clear whether it is a problem that no process is > > running anymore or if that's just the normal case. > > This is true in general, but sometimes we do have enough information > to distinguish the two cases. > > For instance, the presence of the chkconfig "pidfile:" header in the > initscript is an excellent indication that it's not a oneshot script > (like iptables), but a real daemon (like httpd). > > This patch works for me. > Comments? OK, you have a point there. Won't help people with no chkconfig header in their scripts, but for Fedora this should be a good thing. Go ahead, commit! > > Michal > > diff --git a/src/service.c b/src/service.c > index 165655e..5c7e62f 100644 > --- a/src/service.c > +++ b/src/service.c > @@ -843,7 +843,7 @@ static int service_load_sysv_path(Service *s, const char > *path) { > > /* Special setting for all SysV services */ > s->type = SERVICE_FORKING; > - s->remain_after_exit = true; > + s->remain_after_exit = !s->pid_file; > s->restart = SERVICE_RESTART_NO; > s->exec_context.std_output = > (s->meta.manager->sysv_console || s->exec_context.std_input > == EXEC_INPUT_TTY) > Thanks, Lennart -- Lennart Poettering - Red Hat, Inc. _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel