diff --git a/package/confd/sysrepo.conf b/package/confd/sysrepo.conf index 184d69cd..e820a22f 100644 --- a/package/confd/sysrepo.conf +++ b/package/confd/sysrepo.conf @@ -1,7 +1,11 @@ #set DEBUG=1 -run name:bootstrap log:prio:user.notice \ - [S] /usr/libexec/confd/bootstrap -- Bootstrapping YANG datastore +run name:bootstrap log:prio:user.notice norestart \ + [S] /usr/libexec/confd/bootstrap \ + -- Bootstrapping YANG datastore + +run name:error :1 log:console norestart if: \ + [S] /usr/libexec/confd/error -- service name:sysrepo log \ [S12345789] sysrepo-plugind -f -p /run/sysrepo.pid -n -v3 -- Configuration daemon @@ -16,6 +20,9 @@ run name:failure log:prio:user.critical norestart if: \ [S] /usr/libexec/confd/load failure-config \ -- Loading failure-config +run name:error :2 log:console norestart if: \ + [S] /usr/libexec/confd/error -- + service name:netopeer log \ [12345789] netopeer2-server -F -t 60 \ -- NETCONF server diff --git a/src/confd/Makefile.am b/src/confd/Makefile.am index e3731a3b..0609108d 100644 --- a/src/confd/Makefile.am +++ b/src/confd/Makefile.am @@ -1,6 +1,5 @@ -SUBDIRS = src yang share +SUBDIRS = bin share src yang dist_doc_DATA = README.md LICENSE dist_sysconf_DATA = confdrc -pkglibexec_SCRIPTS = $(wildcard bin/*) DISTCLEANFILES = *~ *.d ACLOCAL_AMFLAGS = -I m4 diff --git a/src/confd/bin/Makefile.am b/src/confd/bin/Makefile.am new file mode 100644 index 00000000..373413bd --- /dev/null +++ b/src/confd/bin/Makefile.am @@ -0,0 +1,2 @@ +pkglibexec_SCRIPTS = bootstrap error load \ + gen-hostkeys gen-hostname gen-interfaces diff --git a/src/confd/bin/error b/src/confd/bin/error new file mode 100755 index 00000000..c7e94f33 --- /dev/null +++ b/src/confd/bin/error @@ -0,0 +1,5 @@ +#!/bin/sh +# Override using an overlay in your br2-external to change the behavior + +logger -sik -p user.error "The device has reached an unrecoverable error, please RMA." +exec sleep infinity diff --git a/src/confd/configure.ac b/src/confd/configure.ac index 027ed839..b601f155 100644 --- a/src/confd/configure.ac +++ b/src/confd/configure.ac @@ -5,6 +5,7 @@ AM_SILENT_RULES(yes) AC_CONFIG_FILES([ Makefile + bin/Makefile share/Makefile share/factory.d/Makefile share/failure.d/Makefile