From 979887905fd1ab674e83dbac874dfc903257736e Mon Sep 17 00:00:00 2001 From: Micha Glave Date: Tue, 19 Jul 2011 14:03:05 +0200 Subject: [PATCH] cleanup --- net-analyzer/shinken/Manifest | 6 +-- net-analyzer/shinken/files/shinken.confd | 60 ++++++++++------------- net-analyzer/shinken/files/shinken.initd | 3 ++ net-analyzer/shinken/shinken-0.6.5.ebuild | 6 +-- 4 files changed, 36 insertions(+), 39 deletions(-) diff --git a/net-analyzer/shinken/Manifest b/net-analyzer/shinken/Manifest index af0b8d9..9a5945e 100644 --- a/net-analyzer/shinken/Manifest +++ b/net-analyzer/shinken/Manifest @@ -1,5 +1,5 @@ AUX shinken-0.6.5.patch 4004 RMD160 5e96245063b4ecf078387ea5e544e660b69589e5 SHA1 7a74294471276b24b8717252bb71a0eeb99ed16f SHA256 f76cf0a99d8787f80ba498acbd5aeb6651a588fc5f75c4d765d572400f3ea053 -AUX shinken.confd 2041 RMD160 618a2fa8ba16c052445d23f136a6ac7b685e89bb SHA1 22c2eb50379cb604055bef76cdfc443d7514436a SHA256 512d72af135fb74678f0ad42c5cd8d5125de3c77c2adcba7317c3fed316db6f3 -AUX shinken.initd 1195 RMD160 55cbf11743613b5d0fbdf6096e0d2fb7cb556c3c SHA1 813d3a5c7318d1cd347733957ca198c13a6aa99f SHA256 22f0d6e3d49cc9795e1c8a612fb7b23999d90e945dab391bdc8af230b56558d5 +AUX shinken.confd 2020 RMD160 5e4ecd7efbbab180dfde7bec1534d49c73beee2c SHA1 9617d65200fc4184e2a36adf28b335d355f69629 SHA256 6134be270eda7aec06cf2f7140af3bb60e132c0bd27cffebe5a55a5cf3bf215a +AUX shinken.initd 1280 RMD160 cca8a389b0fffeb2d32a5195603a2ef39ac5fdc8 SHA1 145ac4d202957fd03bd36fb35fdb38c6cf33a741 SHA256 421088d443a52bebc5966a59040ae8b05da6f3ae8c952a44295e1c99a20c1bfe DIST shinken-0.6.5.tar.gz 5155015 RMD160 73d3646d092aa0d92474b31257b8c73c252dbc19 SHA1 62ee08fb290570484cb50979ed75791cd83a6a18 SHA256 ff08fb8a9ec669732316d3b2bd4423572efc2123482cbb8128b71c08aad64deb -EBUILD shinken-0.6.5.ebuild 2241 RMD160 da0b87126ac63840dcd3c29b62cd3f74291d49f4 SHA1 cb1b94518f77262534826469315b6c3b05941d8c SHA256 5aaaaad1d02189d62dac3ce2b93cbdb229920b84018fb755a86d376b07285a6b +EBUILD shinken-0.6.5.ebuild 2249 RMD160 ee5355d1400511324c46b873fbae179cca91cf51 SHA1 c988e695fbba38e11de13ca226fb82fab0020b9c SHA256 9db817725f738f8243ffa4f731e896ed3b9cbb674270fabdcb3e25c8d784e622 diff --git a/net-analyzer/shinken/files/shinken.confd b/net-analyzer/shinken/files/shinken.confd index ef7cc2a..1e9239f 100644 --- a/net-analyzer/shinken/files/shinken.confd +++ b/net-analyzer/shinken/files/shinken.confd @@ -1,94 +1,88 @@ -# /etc/default/shinken - -## These vars will overRide the hardcoded ones in init script -ETC=/etc/shinken -VAR=/var/lib/shinken -BIN=/usr/bin +# /etc/conf.d/shinken # location of the nagios configuration file -SHINKENCFG="$ETC/nagios.cfg" +SHINKENCFG="/etc/shinken/nagios.cfg" # We got 2 configs because tools like Centreon don't generate all #configuration (only the shinken.cfg part) -SHINKENSPECIFICCFG="$ETC/shinken-specific.cfg" +SHINKENSPECIFICCFG="/etc/shinken/shinken-specific.cfg" # The command to launch -ARBITERDAEMON=$BIN/shinken-arbiter +ARBITERDAEMON="/usr/bin/shinken-arbiter" #The ARBITER PID if [ -r $SHINKENCFG ] ; then tmppid=`grep 'lock_file=' $SHINKENCFG | grep -v '#' | tail -n 1 | awk -F '=' '{print $2}'` - ARBITERPID=${tmppid-$VAR/arbiterd.pid} + ARBITERPID=${tmppid-/var/lib/shinken/arbiterd.pid} else - ARBITERPID="$VAR/arbiterd.pid" + ARBITERPID="/var/lib/shinken/arbiterd.pid" fi -ARBITERDEBUGFILE="$VAR/arbiter-debug.log" +ARBITERDEBUGFILE="/var/lib/shinken/arbiter-debug.log" ###SCHEDULER PART # location of the scheduler daemon configuration -SCHEDULERCFG="$ETC/schedulerd.ini" +SCHEDULERCFG="/etc/shinken/schedulerd.ini" # The command to launch -SCHEDULERDAEMON=$BIN/shinken-scheduler +SCHEDULERDAEMON="/usr/bin/shinken-scheduler" #The SCHEDULER PID -SCHEDULERPID="$VAR/schedulerd.pid" +SCHEDULERPID="/var/lib/shinken/schedulerd.pid" -SCHEDULERDEBUGFILE="$VAR/scheduler-debug.log" +SCHEDULERDEBUGFILE="/var/lib/shinken/scheduler-debug.log" ###POLLER PART # location of the poller daemon configuration -POLLERCFG="$ETC/pollerd.ini" +POLLERCFG="/etc/shinken/pollerd.ini" # The command to launch -POLLERDAEMON=$BIN/shinken-poller +POLLERDAEMON="/usr/bin/shinken-poller" #The poller pid -POLLERPID="$VAR/pollerd.pid" +POLLERPID="/var/lib/shinken/pollerd.pid" -POLLERDEBUGFILE="$VAR/poller-debug.log" +POLLERDEBUGFILE="/var/lib/shinken/poller-debug.log" ###REACTIONNER PART # location of the reactionner daemon configuration -REACTIONNERCFG="$ETC/reactionnerd.ini" +REACTIONNERCFG="/etc/shinken/reactionnerd.ini" # The command to launch -REACTIONNERDAEMON=$BIN/shinken-reactionner +REACTIONNERDAEMON="/usr/bin/shinken-reactionner" #The reactionner pid -REACTIONNERPID="$VAR/reactionnerd.pid" +REACTIONNERPID="/var/lib/shinken/reactionnerd.pid" -REACTIONNERDEBUGFILE="$VAR/reactionner-debug.log" +REACTIONNERDEBUGFILE="/var/lib/shinken/reactionner-debug.log" ###BROKER PART # location of the broker daemon configuration -BROKERCFG="$ETC/brokerd.ini" +BROKERCFG="/etc/shinken/brokerd.ini" # The command to launch -BROKERDAEMON=$BIN/shinken-broker +BROKERDAEMON="/usr/bin/shinken-broker" #The broker pid -BROKERPID="$VAR/brokerd.pid" +BROKERPID="/var/lib/shinken/brokerd.pid" -BROKERDEBUGFILE="$VAR/broker-debug.log" +BROKERDEBUGFILE="/var/lib/shinken/broker-debug.log" ###RECEIVER PART # location of the broker daemon configuration -RECEIVERCFG="$ETC/receiverd.ini" +RECEIVERCFG="/etc/shinken/receiverd.ini" # The command to launch -RECEIVERDAEMON=$BIN/shinken-receiver +RECEIVERDAEMON="/usr/bin/shinken-receiver" #The broker pid -RECEIVERPID="$VAR/receiverd.pid" - -RECEIVERDEBUGFILE="$VAR/receiver-debug.log" +RECEIVERPID="/var/lib/shinken/receiverd.pid" +RECEIVERDEBUGFILE="/var/lib/shinken/receiver-debug.log" # nicelevel to run nagios daemon with NICENESS=5 diff --git a/net-analyzer/shinken/files/shinken.initd b/net-analyzer/shinken/files/shinken.initd index 04122d6..454a8d8 100644 --- a/net-analyzer/shinken/files/shinken.initd +++ b/net-analyzer/shinken/files/shinken.initd @@ -5,6 +5,8 @@ MODULE=${SVCNAME#*.} _MODULE=$(echo $MODULE | awk '{print toupper($0)}') +SHINKEN=${SHINKEN:-/usr/bin/shinken} +PIDPATH=${PIDPATH:-/var/run/shinken} PIDFILE=${PIDPATH}/${MODULE} LANG=en_US.UTF8 @@ -16,6 +18,7 @@ SHINKENM="/usr/bin/shinken-${MODULE}" if [ $MODULE = "arbiter" ]; then CONFIGFILE="${SHINKENCFG} --config ${SHINKENSPECIFICCFG}" fi +NEED="net" PIDFILE=$(grep '^pidfile=' ${CONFIGFILE} | awk -F= '{ print $2 }') depend() { diff --git a/net-analyzer/shinken/shinken-0.6.5.ebuild b/net-analyzer/shinken/shinken-0.6.5.ebuild index fe18d71..f84afef 100644 --- a/net-analyzer/shinken/shinken-0.6.5.ebuild +++ b/net-analyzer/shinken/shinken-0.6.5.ebuild @@ -27,7 +27,7 @@ RDEPEND=" DEPEND="${RDEPEND} !net-analyzer/nagios" -SHINKENMODULES="scheduler poller reactionner broker arbiter" +SHINKENMODULES="scheduler poller reactionner broker" src_unpack() { unpack ${A} @@ -78,10 +78,10 @@ src_install() { done newconfd ${FILESDIR}/${PN}.confd ${PN} - newinitd ${FILESDIR}/${PN}.initd ${PN} + newinitd ${FILESDIR}/${PN}.initd ${PN}.arbiter cd ${D}/etc/init.d for mod in ${SHINKENMODULES}; do - ln -s ${PN} ${PN}.${mod} || die + ln -s ${PN}.arbiter ${PN}.${mod} || die done }