mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-30 12:33:02 +02:00
confd: rename Finit sysrepo.conf -> confd.conf
Everything else is named confd, even syslog messages are logged as confd, and we've talked about not using sysrepo-plugind one day, so let's prepare for a world where everthing is like that. Also, and even more importantly, fix the sysrepo-plugind condition. We cannot use <pid/syslogd>, because it can be restarted and thus consequently Finit will stop sysrepo-plugind. This first caused a bit of head scratching because it cause a lot of very odd errors in the execution of sysrepo-plugind, transactions being abruptly aborted for instace. Whatt we can do, however, is use a static condition, which Finit has support for since a few releases now. We want to guard the start of our sysrepo-plugind service behind YANG /usr/libexec/confd/bootstrap. So we can use <run/bootstrap/success>. In case the bootstrap fails, we catch that in the row before using if:<run/bootstrap/failure> to trigger the /usr/libexec/confd/error script (described previously). The other run/task/services can be guarded behind <pid/confd> and now everything suddenly makes sense. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
committed by
Tobias Waldekranz
parent
787955d877
commit
db1d7f41e7
@@ -7,24 +7,24 @@ run name:bootstrap log:prio:user.notice norestart <pid/syslogd> \
|
||||
run name:error :1 log:console norestart if:<run/bootstrap/failure> \
|
||||
[S] /usr/libexec/confd/error --
|
||||
|
||||
service name:sysrepo log <pid/syslogd> \
|
||||
[S12345789] sysrepo-plugind -f -p /run/sysrepo.pid -n -v3 -- Configuration daemon
|
||||
service name:confd log <run/bootstrap/success> \
|
||||
[S12345789] sysrepo-plugind -f -p /run/confd.pid -n -v3 -- Configuration daemon
|
||||
|
||||
# Bootstrap system with startup-config
|
||||
run name:startup log:prio:user.notice norestart \
|
||||
[S] <pid/sysrepo> /usr/libexec/confd/load -b startup-config \
|
||||
[S] <pid/confd> /usr/libexec/confd/load -b startup-config \
|
||||
-- Loading startup-config
|
||||
|
||||
# Run if loading startup-config fails for some reason
|
||||
run name:failure log:prio:user.critical norestart if:<run/startup/failure> \
|
||||
[S] <pid/sysrepo> /usr/libexec/confd/load failure-config \
|
||||
[S] <pid/confd> /usr/libexec/confd/load failure-config \
|
||||
-- Loading failure-config
|
||||
|
||||
run name:error :2 log:console norestart if:<run/startup/failure> \
|
||||
[S] /usr/libexec/confd/error --
|
||||
|
||||
service name:netopeer log \
|
||||
[12345789] <pid/sysrepo> netopeer2-server -F -t 60 \
|
||||
[12345789] <pid/confd> netopeer2-server -F -t 60 \
|
||||
-- NETCONF server
|
||||
|
||||
# XXX: This is a hack, talk to Joachim
|
||||
@@ -14,8 +14,8 @@ CONFD_DEPENDENCIES = augeas jansson libite sysrepo libsrx
|
||||
CONFD_AUTORECONF = YES
|
||||
|
||||
define CONFD_INSTALL_EXTRA
|
||||
cp $(CONFD_PKGDIR)/sysrepo.conf $(FINIT_D)/available/
|
||||
ln -sf ../available/sysrepo.conf $(FINIT_D)/enabled/sysrepo.conf
|
||||
cp $(CONFD_PKGDIR)/confd.conf $(FINIT_D)/available/
|
||||
ln -sf ../available/confd.conf $(FINIT_D)/enabled/confd.conf
|
||||
cp $(CONFD_PKGDIR)/tmpfiles.conf $(TARGET_DIR)/etc/tmpfiles.d/confd.conf
|
||||
endef
|
||||
CONFD_POST_INSTALL_TARGET_HOOKS += CONFD_INSTALL_EXTRA
|
||||
|
||||
@@ -1 +1 @@
|
||||
service name:statd log [S12345789] <pid/sysrepo> statd -f -p /run/statd.pid -n -- Status daemon
|
||||
service name:statd log [S12345789] <pid/confd> statd -f -p /run/statd.pid -n -- Status daemon
|
||||
|
||||
Reference in New Issue
Block a user