Skip to contentSkip to conversation

nagios-nrpe: fix systemd service start failed

PATCH In review [email protected] 2 participants 2 messages Jun 6, 2019 – Jun 10, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nagios-nrpe: fix systemd service start failed

From: Changqing Li <[email protected]>

Jun 06 01:44:51 qemux86 systemd[1]: Started Nagios nrpe plugin.
Jun 06 01:44:51 qemux86 nrpe[1263]: Starting up daemon
Jun 06 01:44:51 qemux86 nrpe[1263]: Cannot write to pidfile '/var/nagios/nrpe.pid' - check your privileges.
Jun 06 01:44:51 qemux86 systemd[1]: nagios-nrpe.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jun 06 01:44:51 qemux86 systemd[1]: nagios-nrpe.service: Failed with result 'exit-code'

In configuration file /etc/nagios/nrpe.cfg, the pidfile is under /var/nagios.

fix by stop rm the /var/nagios, and include it into daemon packages

---
 recipes-extended/nagios/nagios-nrpe_3.2.1.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
recipes-extended/nagios/nagios-nrpe_3.2.1.bb +1 -2
index 9493336..3afa5dd 100644
@@ -73,8 +73,6 @@ do_install_append() {
         install -d ${D}${systemd_unitdir}/system
         install -m 644 ${WORKDIR}/nagios-nrpe.service ${D}${systemd_unitdir}/system/
     fi
-
-    rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/nagios
 }
 
 PACKAGES = "${PN}-dbg ${PN}-plugin ${PN}-daemon"
@@ -86,6 +84,7 @@ FILES_${PN}-plugin = "${NAGIOS_PLUGIN_DIR} \
 FILES_${PN}-daemon = "${sysconfdir} \
                       ${bindir} \
                       ${nonarch_libdir}/tmpfiles.d/ \
+                      ${localstatedir} \
 "
 
 RDEPENDS_${PN}-daemon = "nagios-base"
Signature · 1 line
2.7.4
#1 lore raw
Quoted 9 lines · On Wed, Jun 5, 2019 at 10:20 PM <[email protected]> wrote:

From: Changqing Li <[email protected]>

Jun 06 01:44:51 qemux86 systemd[1]: Started Nagios nrpe plugin.
Jun 06 01:44:51 qemux86 nrpe[1263]: Starting up daemon
Jun 06 01:44:51 qemux86 nrpe[1263]: Cannot write to pidfile '/var/nagios/nrpe.pid' - check your privileges.
Jun 06 01:44:51 qemux86 systemd[1]: nagios-nrpe.service: Main process exited, code=exited, status=2/INVALIDARGUMENT
Jun 06 01:44:51 qemux86 systemd[1]: nagios-nrpe.service: Failed with result 'exit-code'
Quoted 5 lines

In configuration file /etc/nagios/nrpe.cfg, the pidfile is under /var/nagios.

fix by stop rm the /var/nagios, and include it into daemon packages

Merged.

Bruce

Quoted 33 lines
---
 recipes-extended/nagios/nagios-nrpe_3.2.1.bb | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
recipes-extended/nagios/nagios-nrpe_3.2.1.bb +1 -3
index 9493336..3afa5dd 100644
@@ -73,8 +73,6 @@ do_install_append() {
         install -d ${D}${systemd_unitdir}/system
         install -m 644 ${WORKDIR}/nagios-nrpe.service ${D}${systemd_unitdir}/system/
     fi
-
-    rmdir -p --ignore-fail-on-non-empty ${D}${localstatedir}/nagios
 }
 
 PACKAGES = "${PN}-dbg ${PN}-plugin ${PN}-daemon"
@@ -86,6 +84,7 @@ FILES_${PN}-plugin = "${NAGIOS_PLUGIN_DIR} \
 FILES_${PN}-daemon = "${sysconfdir} \
                       ${bindir} \
                       ${nonarch_libdir}/tmpfiles.d/ \
+                      ${localstatedir} \
 "
 
 RDEPENDS_${PN}-daemon = "nagios-base"
--

2.7.4

--
_______________________________________________
meta-virtualization mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-virtualization

Signature · 3 lines
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II