[LEDE-DEV] [PATCH] procd: add cancel_timeout on rc scripts when a runtime_timeout is specified

2017-02-09 Thread Jurgen Van Ham
Enable procd to restrict the execution time of a rc scripts during shutdown, even when a script ignores the SIGTERM signal by insisting after 10s with a SIGKILL. Signed-off-by: Jurgen Van Ham --- file /etc/rc.d/K01test reproduces the problem that this patch addresses. #!/bin/sh h_sigterm

[LEDE-DEV] Support for more than a single overlay, which is selected at boot time

2017-03-07 Thread Jurgen Van Ham
Hi all, I want to support multiple (currently just two) configurations on a single device. One of these configurations is chosen at boot time. Instead of saving and restoring the configuration each time, I came up with a solution that relies on extending the overlay by splitting it into two banks.

Re: [LEDE-DEV] Support for more than a single overlay, which is selected at boot time

2017-03-10 Thread Jurgen Van Ham
ig1 /state/sql -> /state/sql2 Regards, Jurgen On Thu, Mar 9, 2017 at 5:04 AM, Philip Prindeville wrote: > >> On Mar 7, 2017, at 6:15 AM, Jurgen Van Ham wrote: >> >> Hi all, >> >> I want to support multiple (currently just two) configurations on a >>

[LEDE-DEV] Procd instance pidfiles remain after daemon dies unexpectedly

2016-06-30 Thread Jurgen Van Ham
Dear all, Procd supports instance_writepid and instance_removepid in the file instance.c. The removepid is called when stopping a daemon or restarting it. However, when a daemon dies and it is not configured to respawn the pidfile is not removed. When other daemon watch the pidfile because they

[LEDE-DEV] a Procd alternative to respawn for a died daemon?

2016-07-01 Thread Jurgen Van Ham
Dear all, The current version of procd can respond to a failing daemon by respawning it. This works for daemons that no (or not many) daemons rely on. Is there an elegant way to cause a restart after critical service dies. With critical I mean that a mere restart would require too many actions fr

Re: [LEDE-DEV] Procd instance pidfiles remain after daemon dies unexpectedly

2016-07-01 Thread Jurgen Van Ham
Ok, I'll try this and once I confirm that it behaves as expected, I'll publish the patch here. On Fri, Jul 1, 2016 at 10:26 AM, John Crispin wrote: > > > On 01/07/2016 08:45, Jurgen Van Ham wrote: >> Dear all, >> >> Procd supports instance_writep

[LEDE-DEV] [PATCH] remove pidfile when daemon dies and is not respawned

2016-07-04 Thread Jurgen Van Ham
When a daemon dies unexpectedly and it will not be respawned, the pidfile needs to be removed. (halt is set as !respawn) --- a/service/instance.c2016-07-01 14:22:53.507113056 +0200 +++ b/service/instance.c2016-07-01 14:24:38.541075073 +0200 @@ -513,7 +513,7 @@ uloop_timeout

[LEDE-DEV] [PATCH] procd: remove pidfile after unexpected termination without respawn

2016-07-05 Thread Jurgen Van Ham
When procd detects a daemon halts and it is not configured to be respawned, the pidfile has to be removed. Signed-off-by: Jurgen Van Ham --- service/instance.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/instance.c b/service/instance.c index dccf4b4..d7d1f82

[LEDE-DEV] [PATCH] procd: instance_stop causes a call to instance_removepid via instance_exit, no need to do this already when the instance will be stopped.

2016-07-15 Thread Jurgen Van Ham
Signed-off-by: Jurgen Van Ham --- service/instance.c |1 - 1 file changed, 1 deletion(-) diff --git a/service/instance.c b/service/instance.c index d7d1f82..8f7835a 100644 --- a/service/instance.c +++ b/service/instance.c @@ -541,7 +541,6 @@ instance_stop(struct service_instance *in