From: | "Matt Thode (prometheanfire)" <prometheanfire@g.o> |
---|---|
To: | gentoo-commits@l.g.o |
Subject: | [gentoo-commits] gentoo-x86 commit in net-analyzer/icinga/files: icinga-init.d-2 |
Date: | Sun, 08 Jan 2012 18:41:25 |
Message-Id: | 20120108184116.091092004C@flycatcher.gentoo.org |
1 | prometheanfire 12/01/08 18:41:16 |
2 | |
3 | Modified: icinga-init.d-2 |
4 | Log: |
5 | fixed init, reload was not working. readded checkconfig function to fix |
6 | |
7 | (Portage version: 2.1.10.11/cvs/Linux x86_64) |
8 | |
9 | Revision Changes Path |
10 | 1.5 net-analyzer/icinga/files/icinga-init.d-2 |
11 | |
12 | file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga/files/icinga-init.d-2?rev=1.5&view=markup |
13 | plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga/files/icinga-init.d-2?rev=1.5&content-type=text/plain |
14 | diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-analyzer/icinga/files/icinga-init.d-2?r1=1.4&r2=1.5 |
15 | |
16 | Index: icinga-init.d-2 |
17 | =================================================================== |
18 | RCS file: /var/cvsroot/gentoo-x86/net-analyzer/icinga/files/icinga-init.d-2,v |
19 | retrieving revision 1.4 |
20 | retrieving revision 1.5 |
21 | diff -u -r1.4 -r1.5 |
22 | --- icinga-init.d-2 4 Dec 2011 19:27:46 -0000 1.4 |
23 | +++ icinga-init.d-2 8 Jan 2012 18:41:15 -0000 1.5 |
24 | @@ -8,6 +8,14 @@ |
25 | after mysql postgresql ido2db |
26 | } |
27 | |
28 | +checkconfig() { |
29 | + # Silent Check |
30 | + /usr/sbin/icinga -v /etc/icinga/icinga.cfg &>/dev/null && return 0 |
31 | + # Now we know there's problem - run again and display errors |
32 | + /usr/sbin/icinga -v /etc/icinga/icinga.cfg |
33 | + eend $? "Configuration Error. Please fix your configfile" |
34 | +} |
35 | + |
36 | reload() |
37 | { |
38 | checkconfig || return 1 |