Parcourir la source

Need to update LDFLAGS for HP-UX. And LDFLAGS wasn't being exported!

John C. Frickson il y a 9 ans
Parent
commit
9aca8253e7

+ 2 - 1
configure.ac

@@ -32,6 +32,7 @@ AC_SUBST(PKG_REL_DATE)
 AC_SUBST(RPM_RELEASE)
 AC_SUBST(INSTALL)
 AC_SUBST(SNPRINTF_O)
+AC_SUBST(LDFLAGS)
 AC_SUBST(OTHERLIBS)
 AC_SUBST(SOCKETLIBS)
 AC_SUBST(LIBWRAPLIBS)
@@ -421,7 +422,7 @@ if test x$check_for_ssl = xyes; then
 	dnl in '/usr/local/lib/libwrap.a(setenv.o)' and '/usr/local/lib/libiberty.a(setenv.o)'
 	dnl so allow duplicate symbols, and use the first one
 	if test "`uname -s`" = "HP-UX" ; then
-		LDFLAGS="$LDFLAGS +allowdups";
+		LDFLAGS="$LDFLAGS -Wl,+allowdups";
 	fi
 
 	dnl RedHat 8.0 and 9.0 include openssl compiled with kerberos, so we must include header file

+ 0 - 54
startup/bsd-init

@@ -1,54 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2016 Nagios(R) Core(TM) Development Team
-#
-# PROVIDE: nrpe
-# REQUIRE: LOGIN
-# KEYWORD: shutdown
-
-#
-# Add the following lines to /etc/rc.conf to enable nrpe:
-#
-# nrpe_enable (bool):    Set to "NO" by default.
-#                        Set it to "YES" to enable nrpe.
-# nrpe_flags (str):      Set to "" by default.
-# nrpe_configfile (str): Set to "/etc/nagios/nrpe.cfg" by default.
-#
-
-. /etc/rc.subr
-
-sig_reload=HUP
-
-nrpe_enable=${nrpe_enable:-"NO"}
-command=${nrpe_program:-"/usr/sbin/nrpe"}
-command_args="-c ${nrpe_configfile} -d"
-extra_commands=reload
-pidfile=${pidfile:-"/var/run/nrpe.pid"}
-nrpe_configfile=${nrpe_configfile:-"/etc/nagios/nrpe.cfg"}
-
-name=nrpe
-rcvar=nrpe_enable
-load_rc_config "${name}"
-required_files="${nrpe_configfile}"
-
-start_precmd=nrpe_prestart
-stop_precmd=find_pidfile
-
-find_pidfile()
-{
-    [ -n "$nrpe_pidfile" ] &&
-        warn "No longer necessary to set nrpe_pidfile in rc.conf[.local]"
-
-    if getpidfile_from_conf pid_file ${nrpe_configfile}; then
-        pidfile="$_pidfile_from_conf"
-	else
-	    pidfile='%%PIDDIR%%/nrpe.pid'
-}
-
-nrpe_prestart()
-{
-    find_pidfile
-    install -d -o ${nrpe_user:-nagios} ${pidfile%/*}
-}
-
-run_rc_command "$1"

+ 0 - 47
startup/debian-init

@@ -1,47 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2016 Nagios(R) Core(TM) Development Team
-#
-# Start/stop the nrpe daemon.
-
-NRPE_BIN=/usr/sbin/nrpe
-NRPE_CFG=/etc/nagios/nrpe.cfg
-PID_FILE=/var/run/nrpe/nrpe.pid
-
-test -x $NRPE_BIN || exit 0
-
-case "$1" in
-
-start)
-	echo -n "Starting nagios remote plugin daemon: nrpe"
-	start-stop-daemon --start --quiet --pidfile $PID_FILE --exec $NRPE_BIN -- -c $NRPE_CFG -d
-	echo "." 
-	;;
-
-stop)
-	echo -n "Stopping nagios remote plugin daemon: nrpe"
-	start-stop-daemon --stop --quiet --pidfile $PID_FILE --exec $NRPE_BIN
-	echo "."
-	;;
-
-restart|force-reload)
-	echo -n "Restarting nagios remote plugin daemon: nrpe"
-	start-stop-daemon --stop --quiet --pidfile $PID_FILE --exec $NRPE_BIN
-	start-stop-daemon --start --quiet --pidfile $PID_FILE --exec $NRPE_BIN -- -c $NRPE_CFG -d
-	echo "."
-	;;
-
-reload)
-	echo -n "Reloading configuration files for nagios remote plugin daemon: nrpe"
-	test -f $PID_FILE || exit 0
-	test -x /bin/kill && /bin/kill -HUP `cat $PID_FILE`
-	echo "."
-	;;
-
-*)
-	echo "Usage: $0 start|stop|restart|reload|force-reload"
-	exit 1 
-	;;
-esac
-
-exit 0

+ 0 - 2
startup/default-inetd

@@ -1,2 +0,0 @@
-# Enable the following entry to enable the nrpe daemon
-#nrpe stream tcp nowait nagios /usr/sbin/nrpe -c /etc/nagios/nrpe.cfg --inetd

+ 0 - 132
startup/default-init

@@ -1,132 +0,0 @@
-#!/bin/sh
-#
-# Copyright (c) 2016 Nagios(R) Core(TM) Development Team
-#
-# chkconfig: - 80 30
-# description: Starts and stops the Nagios Remote Plugin Executor \
-#              so a remote nagios server can run plugins on this host
-#
-### BEGIN INIT INFO
-# Provides:           nrpe
-# Required-Start:     $local_fs $remote_fs $syslog $network $time
-# Required-Stop:      $local_fs $remote_fs $syslog $network
-# Default-Start:      2 3 4 5
-# Default-Stop:       0 1 6
-# Short-Description:  Starts and stops the Nagios Remote Plugin Executor
-# Description:        Starts and stops the Nagios Remote Plugin Executor
-#                     so a remote nagios server can run plugins on this host
-### END INIT INFO
-
-
-NRPE_BIN=/usr/sbin/nrpe
-NRPE_CFG=/etc/nagios/nrpe.cfg
-LOCK_DIR=/var/lock/subsys
-LOCK_FILE=/var/lock/subsys/nrpe
-PID_FILE=/var/run/nrpe/nrpe.pid
-
-test -x $NRPE_BIN || exit 5
-
-RETVAL=0
-
-# Default these commands/functions to RedHat/CentOS etc. values
-START_CMD="daemon --pidfile $PID_FILE"
-STAT_CMD="status nrpe"
-QSTAT_CMD="status nrpe >/dev/null 2>&1"
-TERM_CMD="killproc -p $PID_FILE $NRPE_BIN -TERM"
-HUP_CMD="killproc -p $PID_FILE $NRPE_BIN -HUP"
-PRT_STAT="echo"
-EXIT_CMD="exit"
-
-
-# Source the function library
-if [ -f /etc/rc.status ]; then
-
-	. /etc/rc.status
-	# Set these commands/functions to SuSE etc. values
-	START_CMD="startproc -p $PID_FILE"
-	STAT_CMD="checkproc"
-	QSTAT_CMD="rc_status"
-	TERM_CMD="killproc -p $PID_FILE -TERM $NRPE_BIN"
-	HUP_CMD="killproc -p $PID_FILE -HUP $NRPE_BIN"
-	PRT_STAT="rc_status -v -r"
-	EXIT_CMD="rc_exit"
-	rc_reset
-
-elif [ -f /lib/lsb/init-functions ]; then
-
-	. /lib/lsb/init-functions
-	START_CMD="start_daemon -p $PID_FILE"
-	QSTAT_CMD="pidofproc -p $PID_FILE $NRPE_BIN"
-	PRT_STAT="status_of_proc -p $PID_FILE $NRPE_BIN nrpe"
-
-elif [ -f /etc/rc.d/init.d/functions ]; then
-
-	. /etc/rc.d/init.d/functions
-
-elif [ -f /etc/init.d/functions ]; then
-
-	. /etc/init.d/functions
-
-elif [ -f /etc/rc.d/functions ]; then
-
-	. /etc/rc.d/functions
-
-fi
-
-
-# See how we were called.
-case "$1" in
-
-start)
-	# Start daemons.
-	echo -n "Starting nrpe: "
-	$START_CMD $NRPE_BIN -c $NRPE_CFG -d
-	RETVAL=$?
-	$PRT_STAT
-	if [ $RETVAL = 0 ]; then
-		[ -d $LOCK_DIR ] && touch $LOCK_FILE
-	fi
-	;;
-
-stop)
-	# Stop daemons.
-	echo -n "Shutting down nrpe: "
-	$TERM_CMD
-	RETVAL=$?
-	$PRT_STAT
-	if [ $RETVAL = 0 ]; then
-		[ -d $LOCK_DIR ] && rm -f $LOCK_FILE
-	fi
-	;;
-
-restart|force-reload)
-	$0 stop
-	$0 start
-	$QSTAT_CMD
-	;;
-
-reload)
-	echo -n "Reloading nrpe: "
-	$HUP_CMD
-	RETVAL=$?
-	$PRT_STAT
-	;;
-
-try-restart|condrestart)
-	$QSTAT_CMD || exit 0
-	$0 stop
-	$0 start
-	$QSTAT_CMD
-	;;
-
-status)
-	$STAT_CMD
-	RETVAL=$?
-	;;
-
-*)
-	echo "Usage: nrpe {start|stop|restart|reload|try-restart|condrestart|status}"
-	exit 1
-esac
-
-$EXIT_CMD $RETVAL

+ 0 - 20
startup/default-service

@@ -1,20 +0,0 @@
-[Unit]
-Description=Nagios Remote Program Executor
-Documentation=http://www.nagios.org/documentation
-After=var-run.mount nss-lookup.target network.target local-fs.target time-sync.target
-Before=getty@tty1.service plymouth-quit.service xdm.service
-
-[Install]
-WantedBy=multi-user.target
-
-[Service]
-Type=forking
-Restart=on-abort
-PIDFile=/var/run/nrpe.pid
-ExecStart=/usr/sbin/nrpe -c /etc/nagios/nrpe.cfg
-ExecStopPost=/bin/rm -f /var/run/nrpe.pid
-TimeoutStopSec=60
-User=nagios
-Group=nagios
-PrivateTmp=true
-OOMScoreAdjust=-500

+ 0 - 15
startup/default-xinetd

@@ -1,15 +0,0 @@
-# default: on
-# description: NRPE (Nagios Remote Plugin Executor)
-service nrpe
-{
-    disable         = yes
-    socket_type     = stream
-    port            = 5666
-    wait            = no
-    user            = nagios
-    group           = nagios
-    server          = /usr/sbin/nrpe
-    server_args     = -c /etc/nagios/nrpe.cfg --inetd
-    only_from       = 127.0.0.1
-    log_on_failure  += USERID
-}

+ 0 - 36
startup/mac-org.nagios.PKG_NAME.plist

@@ -1,36 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist PUBLIC "-//Apple/DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
-<plist version="1.0">
-<dict>
-	<key>Label</key>
-	<string>org.nagios.nrpe</string>
-	<key>UserName</key>
-	<string>nagios</string>
-	<key>GroupName</key>
-	<string>nagios</string>
-	<key>Program</key>
-	<string>/usr/sbin/nrpe</string>
-	<key>ProgramArguments</key>
-	<array>
-		<string>-c</string>
-		<string>/etc/nagios/nrpe.cfg</string>
-	</array>
-	<key>KeepAlive</key>
-	<dict>
-		<key>SuccessfulExit</key>
-		<false/>
-		<key>NetworkState</key>
-		<true/>
-	</dict>
-	<key>RunAtLoad</key>
-	<true/>
-	<!-- ExitTimeOut would be for nagios itself, not nrpe -->
-	<key>ExitTimeOut</key>
-	<integer>120</integer>
-	<key>ProcessType</key>
-	<string>Background</string>
-	<!-- LaunchOnlyOnce might be for nagios checkconfig -->
-	<key>LaunchOnlyOnce</key>
-	<false/>
-</dict>
-</plist>

+ 0 - 7
startup/openrc-conf

@@ -1,7 +0,0 @@
-# /etc/conf.d/nrpe : config file for /etc/init.d/nrpe
-
-# Configuration file - default is /etc/nrpe.cfg
-NRPE_CFG="@pgksysconfdir@/nrpe.cfg"
-
-# Any additional nrpe options (-n -4 -6)
-NRPE_OPTS=""

+ 0 - 49
startup/openrc-init

@@ -1,49 +0,0 @@
-#!/sbin/runscript
-#
-# Copyright (c) 2016 Nagios(R) Core(TM) Development Team
-#
-# Start/stop the nrpe daemon.
-#
-# Goes in /etc/init.d - Config is in /etc/conf.d/nrpe
-
-opts="reload"
-# extra_started_commands="reload"		use this if OpenRC >= 0.9.4
-
-NRPE_BIN="/usr/sbin/nrpe"
-NRPE_PID="/var/run/nrpe/nrpe.pid"
-
-depend() {
-	use logger dns net localmount netmount nfsmount
-}
-
-checkconfig() {
-	# Make sure the config file exists
-	if [ ! -f $NRPE_CFG ]; then
-		eerror "You need to setup $NRPE_CFG.
-		return 1
-	fi
-	return 0
-}
-
-start() {
-	checkconfig || return 1
-	ebegin "Starting nrpe"
-	# Make sure we have a sane current directory
-	cd /
-	start-stop-daemon --start --exec $NRPE_BIN --pidfile $PID_FILE \
-		-- -c $NRPE_CFG -d $NRPE_OPTS
-	eend $?
-}
-
-stop() {
-	ebegin "Stopping nrpe"
-	start-stop-daemon --stop --exec $NRPE_BIN --pidfile $PID_FILE
-	eend $?
-}
-
-reload() {
-	ebegin "Reloading nrpe"
-	start-stop-daemon --stop --oknodo --exec $NRPE_BIN \
-		--pidfile $PID_FILE --signal HUP
-	eend $?
-}

+ 0 - 152
startup/solaris-PKG_NAME.xml

@@ -1,152 +0,0 @@
-<?xml version="1.0"?>
-<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
-
-<!--
-	This is a manifest file for the nrpe service. Import it using
-		svccfg import <path/to/this/file>
-	and enable it using
-		svcadm enable nrpe
--->
-
-<service_bundle type='manifest' name='NGOS:nrpe'>
-
-	<service
-		name='network/nagios/nrpe'
-		version='1'
-		type='service'>
-
-		<single_instance />
-
-		<dependency
-			name='fs-local'
-			grouping='require_all'
-			restart_on='none'
-			type='service'>
-				<service_fmri value='svc:/system/filesystem/local' />
-		</dependency>
-
-		<dependency
-			name='autofs'
-			grouping='optional_all'
-			restart_on='none'
-			type='service'>
-			<service_fmri value='svc:/system/filesystem/autofs' />
-		</dependency>
-
-		<dependency name='net-loopback'
-			grouping='require_all'
-			restart_on='none'
-			type='service'>
-			<service_fmri value='svc:/network/loopback' />
-		</dependency>
-
-		<dependency name='net-physical'
-			grouping='require_all'
-			restart_on='none'
-			type='service'>
-			<service_fmri value='svc:/network/physical' />
-		</dependency>
-
-		<dependency name='cryptosvc'
-			grouping='require_all'
-			restart_on='none'
-			type='service'>
-			<service_fmri value='svc:/system/cryptosvc' />
-		</dependency>
-
-		<dependency name='utmp'
-			grouping='require_all'
-			restart_on='none'
-			type='service'>
-			<service_fmri value='svc:/system/utmp' />
-		</dependency>
-
-		<dependency name='config_data'
-			grouping='require_all'
-			restart_on='restart'
-			type='path'>
-			<service_fmri
-			    value='file://localhost/pkg/etc/nrpe.cfg' />
-		</dependency>
-
-		<dependency
-			name='system-log'
-			grouping='optional_all'
-			restart_on='none'
-			type='service'>
-			<service_fmri value='svc:/system/system-log' />
-		</dependency>
-
-		<dependent
-			name='nrpe_multi-user-server'
-			grouping='optional_all'
-			restart_on='none'>
-				<service_fmri
-				    value='svc:/milestone/multi-user-server' />
-		</dependent>
-
-		<method_context>
-			<method_credential user='nagios' group='nagios'/>
-			<method_environment>
-				<envvar name='BASEDIR' value='/export/home/nagios'/>
-			</method_environment>
-		</method_context>
-
-		<exec_method
-			type='method'
-			name='start'
-			exec='/usr/sfw/sbin/tcpd -c /etc/nagios/nrpe.cfg -i'
-			arg0='/usr/sbin/nrpe'
-			timeout_seconds='60'/>
-
-		<exec_method
-			type='method'
-			name='stop'
-			exec=':kill'
-			timeout_seconds='60'/>
-
-		<exec_method
-			type='method'
-			name='refresh'
-			exec=':hup'
-			timeout_seconds='60'/>
-
-		<property_group name='startd' type='framework'>
-			<propval name='ignore_error'
-				type='astring'
-				value='core,signal' />
-		</property_group>
-
-		<property_group name='general' type='framework'>
-			<propval name='enabled'
-				type='boolean'
-				value='false'/>
-			<propval name='action_authorization'
-				type='astring'
-				value='solaris.smf.manage.nrpe'/>
-			<propval name='value_authorization'
-				type='astring'
-				value='solaris.smf.manage.nrpe'/>
-		</property_group>
-
-		<stability value='Unstable' />
-
-		<create_default_instance name='default' enabled='false' />
-
-		<template>
-			<common_name>
-				<loctext xml:lang="C">NRPE daemon</loctext>
-			</common_name>
-			<description>
-				<loctext xml:lang="C">
-					Nagios Remote Plugin Executor daemon
-				</loctext>
-			</description>
-			<documentation>
-				<doc_link name='nagios.org' uri='http://www.nagios.org' />
-			</documentation>
-		</template>
-
-	</service>
-
-</service_bundle>