Major change, rename <svc/...> conditions to <pid/...> conditions

The <svc/foo> condition was created to synchronize starting services,
hence the abbreviation.  Example: the Quagga ripd needs to start after
the zebra daemon to ensure its UNIX domain socket is active, otherwise
events may be lost.

However, considering that synchronization was implemented with UNIX PID
files, e.g. waiting for /var/run/quagga/zebra.pid to be created, the
condition abbreviation name <svc/foo> was hard to understand by most
newcomers to Finit.  To make matters worse, a new feature to track or
even create PID files for services that don't create one themselves,
using the syntax 'pid:/path/to/foo.pid' was added.

Connecting the dots between these wasn't obvious.

This patch renames service conditions pid conditions and also adds
a compatibility wrapper to the Finit .conf parser.  Any condition
given in old .conf files with 'svc/' prefix are internally renamed
'pid/', along with a LOG_INFO notice in syslog.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2021-02-09 22:07:03 +01:00
parent ff41868b59
commit a8b113185d
15 changed files with 43 additions and 36 deletions
+1 -1
View File
@@ -1 +1 @@
service [2345] <svc/sbin/syslogd> /usr/sbin/crond -f -S -c /etc/crontabs -- Cron daemon
service [2345] <pid/sbin/syslogd> /usr/sbin/crond -f -S -c /etc/crontabs -- Cron daemon
+1 -1
View File
@@ -1,2 +1,2 @@
# Start klogd as soon as possible, should always run
service [S12345] <svc/syslogd> klogd -n -- Kernel log daemon
service [S12345] <pid/syslogd> klogd -n -- Kernel log daemon
+1 -1
View File
@@ -1,2 +1,2 @@
# Silly Busybox ntpd has no option to use syslog when running in foreground
service [2345] log <svc/syslogd> ntpd -n -N -p pool.ntp.org -- NTP daemon
service [2345] log <pid/syslogd> ntpd -n -N -p pool.ntp.org -- NTP daemon