Merge lp://qastaging/~ubuntu-branches/ubuntu/lucid/zabbix/lucid-201002122335 into lp://qastaging/ubuntu/lucid/zabbix

Proposed by James Westby
Status: Needs review
Proposed branch: lp://qastaging/~ubuntu-branches/ubuntu/lucid/zabbix/lucid-201002122335
Merge into: lp://qastaging/ubuntu/lucid/zabbix
Diff against target: 465 lines (+284/-0) (has conflicts)
15 files modified
debian/NEWS.Debian (+15/-0)
debian/README.source (+10/-0)
debian/changelog (+29/-0)
debian/control (+4/-0)
debian/po/cs.po (+4/-0)
debian/po/es.po (+4/-0)
debian/po/fr.po (+4/-0)
debian/po/it.po (+4/-0)
debian/po/pt.po (+4/-0)
debian/po/ru.po (+4/-0)
debian/po/sv.po (+4/-0)
debian/po/templates.pot (+4/-0)
debian/zabbix-frontend-php.links (+4/-0)
debian/zabbix-server-mysql.zabbix-server.init (+95/-0)
debian/zabbix-server-pgsql.zabbix-server.init (+95/-0)
Text conflict in debian/NEWS.Debian
Text conflict in debian/README.source
Text conflict in debian/changelog
Text conflict in debian/control
Text conflict in debian/po/cs.po
Text conflict in debian/po/es.po
Text conflict in debian/po/fr.po
Text conflict in debian/po/it.po
Text conflict in debian/po/pt.po
Text conflict in debian/po/ru.po
Text conflict in debian/po/sv.po
Text conflict in debian/po/templates.pot
Text conflict in debian/zabbix-frontend-php.links
Text conflict in debian/zabbix-server-mysql.zabbix-server.init
Text conflict in debian/zabbix-server-pgsql.zabbix-server.init
To merge this branch: bzr merge lp://qastaging/~ubuntu-branches/ubuntu/lucid/zabbix/lucid-201002122335
To post a comment you must log in.
Revision history for this message
James Westby (james-w) wrote :

The package history in the archive and the history in the bzr branch differ. As the archive is authoritative the history of lp:ubuntu/lucid/zabbix now reflects that and the old bzr branch has been pushed to lp:~ubuntu-branches/ubuntu/lucid/zabbix/lucid-201002122335. A merge should be performed if necessary.

Unmerged revisions

24. By Fabio Tranchitella

Set Default-Start to "2 3 4 5" and Default-Stop to "0 1 6" for all the init
scripts.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/NEWS.Debian'
--- debian/NEWS.Debian 2010-01-28 10:42:04 +0000
+++ debian/NEWS.Debian 2010-02-12 23:42:15 +0000
@@ -1,3 +1,4 @@
1<<<<<<< TREE
1zabbix (1:1.8.1-1) unstable; urgency=low2zabbix (1:1.8.1-1) unstable; urgency=low
23
3 The Zabbix developers note that if Zabbix 1.8 is used with a node-based4 The Zabbix developers note that if Zabbix 1.8 is used with a node-based
@@ -35,3 +36,17 @@
3536
36 -- Christoph Haas <haas@debian.org> Thu, 29 Oct 2009 21:28:03 +010037 -- Christoph Haas <haas@debian.org> Thu, 29 Oct 2009 21:28:03 +0100
3738
39=======
40zabbix (1:1.6.6-4) unstable; urgency=low
41
42 The zabbix_agent has been removed which could be used to start the Zabbix
43 agent from inetd or xinetd. It is recommended to use the zabbix_agentd
44 instead which is a standalone agent process running permanently which is
45 started from /etc/init.d/zabbix-agent by default.
46
47 It is safe to remove the /etc/zabbix/zabbix_agent.conf. The standalone
48 zabbix_agentd process only uses the /etc/zabbix/zabbix_agentd.conf file.
49
50 -- Christoph Haas <haas@debian.org> Thu, 29 Oct 2009 21:28:03 +0100
51
52>>>>>>> MERGE-SOURCE
3853
=== modified file 'debian/README.source'
--- debian/README.source 2009-12-30 18:46:34 +0000
+++ debian/README.source 2010-02-12 23:42:15 +0000
@@ -1,3 +1,4 @@
1<<<<<<< TREE
1This package uses 'dpatch' to add patches. See2This package uses 'dpatch' to add patches. See
2/usr/share/doc/dpatch/README.source.gz on how this works.3/usr/share/doc/dpatch/README.source.gz on how this works.
34
@@ -22,3 +23,12 @@
22[ ] currently the resulting .diff.gz is huge due to the relibtoolizing23[ ] currently the resulting .diff.gz is huge due to the relibtoolizing
2324
24[X] use the font from the appropriate Debian package (lintian warning)25[X] use the font from the appropriate Debian package (lintian warning)
26=======
27This package uses 'dpatch' to add patches. See
28/usr/share/doc/dpatch/README.source.gz on how this works.
29
30Currently we use it to avoid building with libssl. The libssl
31license is not GPL compatible and thus linking against it is
32a GPL violation.
33
34>>>>>>> MERGE-SOURCE
2535
=== modified file 'debian/changelog'
--- debian/changelog 2010-01-28 10:42:04 +0000
+++ debian/changelog 2010-02-12 23:42:15 +0000
@@ -1,3 +1,4 @@
1<<<<<<< TREE
1zabbix (1:1.8.1-1) unstable; urgency=low2zabbix (1:1.8.1-1) unstable; urgency=low
23
3 * New upstream release4 * New upstream release
@@ -64,6 +65,34 @@
6465
65 -- Christoph Haas <haas@debian.org> Sun, 11 Oct 2009 12:51:45 +020066 -- Christoph Haas <haas@debian.org> Sun, 11 Oct 2009 12:51:45 +0200
6667
68=======
69zabbix (1:1.6.6-5) unstable; urgency=low
70
71 * Set Default-Start to "2 3 4 5" and Default-Stop to "0 1 6" for all the init
72 scripts.
73
74 -- Fabio Tranchitella <kobold@debian.org> Thu, 05 Nov 2009 14:07:01 +0100
75
76zabbix (1:1.6.6-4) unstable; urgency=low
77
78 * Added README.source describing the patch and used.
79 * Removed zabbix_agent. By default the zabbix_agentd is used
80 by default anyway.
81 * Added manpage for zabbix_sender.
82 * Using the prototype.js from the libjs-prototype package.
83 * Typo in init.d scripts for zabbix-server-mysql and zabbix-server-pgsql
84 fixed to remove"/etc/init.d/zabbix-server: line 112: running_name:
85 command not found" warning when starting the server.
86
87 -- Christoph Haas <haas@debian.org> Thu, 29 Oct 2009 21:28:03 +0100
88
89zabbix (1:1.6.6-3) unstable; urgency=low
90
91 * debian/po/fi.po updated (Closes: #549855)
92
93 -- Christoph Haas <haas@debian.org> Sun, 11 Oct 2009 12:51:45 +0200
94
95>>>>>>> MERGE-SOURCE
67zabbix (1:1.6.6-2) unstable; urgency=low96zabbix (1:1.6.6-2) unstable; urgency=low
6897
69 * debian/po/ja.po updated (Closes: #548651)98 * debian/po/ja.po updated (Closes: #548651)
7099
=== modified file 'debian/control'
--- debian/control 2010-01-28 10:42:04 +0000
+++ debian/control 2010-02-12 23:42:15 +0000
@@ -70,7 +70,11 @@
7070
71Package: zabbix-frontend-php71Package: zabbix-frontend-php
72Architecture: all72Architecture: all
73<<<<<<< TREE
73Depends: ${misc:Depends}, apache2 | httpd, php5, php5-mysql | php5-pgsql, php5-gd, ucf, dbconfig-common (>= 1.8.19), libjs-prototype (>= 1.6.0.3), libjs-scriptaculous (>= 1.8.2), ttf-dejavu-core74Depends: ${misc:Depends}, apache2 | httpd, php5, php5-mysql | php5-pgsql, php5-gd, ucf, dbconfig-common (>= 1.8.19), libjs-prototype (>= 1.6.0.3), libjs-scriptaculous (>= 1.8.2), ttf-dejavu-core
75=======
76Depends: apache2 | httpd, php5, php5-mysql | php5-pgsql, php5-gd, ucf, dbconfig-common (>= 1.8.19), libjs-prototype (>= 1.6.0.2), ${misc:Depends}
77>>>>>>> MERGE-SOURCE
74Recommends: zabbix-server-mysql | zabbix-server-pgsql, mysql-server (>= 4.0.16-2) | postgresql78Recommends: zabbix-server-mysql | zabbix-server-pgsql, mysql-server (>= 4.0.16-2) | postgresql
75Description: network monitoring solution - PHP front-end79Description: network monitoring solution - PHP front-end
76 Zabbix is a server/client network monitoring system with many features.80 Zabbix is a server/client network monitoring system with many features.
7781
=== modified file 'debian/po/cs.po'
--- debian/po/cs.po 2009-12-30 18:46:34 +0000
+++ debian/po/cs.po 2010-02-12 23:42:15 +0000
@@ -7,7 +7,11 @@
7msgstr ""7msgstr ""
8"Project-Id-Version: zabbix 1:1.1.1-3\n"8"Project-Id-Version: zabbix 1:1.1.1-3\n"
9"Report-Msgid-Bugs-To: zabbix@packages.debian.org\n"9"Report-Msgid-Bugs-To: zabbix@packages.debian.org\n"
10<<<<<<< TREE
10"POT-Creation-Date: 2009-12-30 18:48+0100\n"11"POT-Creation-Date: 2009-12-30 18:48+0100\n"
12=======
13"POT-Creation-Date: 2009-11-05 14:09+0100\n"
14>>>>>>> MERGE-SOURCE
11"PO-Revision-Date: 2009-09-28 08:03+0200\n"15"PO-Revision-Date: 2009-09-28 08:03+0200\n"
12"Last-Translator: Martin Sin <martin.sin@zshk.cz>\n"16"Last-Translator: Martin Sin <martin.sin@zshk.cz>\n"
13"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"17"Language-Team: Czech <debian-l10n-czech@lists.debian.org>\n"
1418
=== modified file 'debian/po/es.po'
--- debian/po/es.po 2009-12-30 18:46:34 +0000
+++ debian/po/es.po 2010-02-12 23:42:15 +0000
@@ -28,7 +28,11 @@
28msgstr ""28msgstr ""
29"Project-Id-Version: zabbix 1:1.6.6-1\n"29"Project-Id-Version: zabbix 1:1.6.6-1\n"
30"Report-Msgid-Bugs-To: zabbix@packages.debian.org\n"30"Report-Msgid-Bugs-To: zabbix@packages.debian.org\n"
31<<<<<<< TREE
31"POT-Creation-Date: 2009-12-30 18:48+0100\n"32"POT-Creation-Date: 2009-12-30 18:48+0100\n"
33=======
34"POT-Creation-Date: 2009-11-05 14:09+0100\n"
35>>>>>>> MERGE-SOURCE
32"PO-Revision-Date: 2009-09-28 08:48+0100\n"36"PO-Revision-Date: 2009-09-28 08:48+0100\n"
33"Last-Translator: Francisco Javier Cuadrado <fcocuadrado@gmail.com>\n"37"Last-Translator: Francisco Javier Cuadrado <fcocuadrado@gmail.com>\n"
34"Language-Team: Debian l10n Spanish <debian-l10n-spanish@lists.debian.org>\n"38"Language-Team: Debian l10n Spanish <debian-l10n-spanish@lists.debian.org>\n"
3539
=== modified file 'debian/po/fr.po'
--- debian/po/fr.po 2009-12-30 18:46:34 +0000
+++ debian/po/fr.po 2010-02-12 23:42:15 +0000
@@ -9,7 +9,11 @@
9msgstr ""9msgstr ""
10"Project-Id-Version: zabbix\n"10"Project-Id-Version: zabbix\n"
11"Report-Msgid-Bugs-To: zabbix@packages.debian.org\n"11"Report-Msgid-Bugs-To: zabbix@packages.debian.org\n"
12<<<<<<< TREE
12"POT-Creation-Date: 2009-12-30 18:48+0100\n"13"POT-Creation-Date: 2009-12-30 18:48+0100\n"
14=======
15"POT-Creation-Date: 2009-11-05 14:09+0100\n"
16>>>>>>> MERGE-SOURCE
13"PO-Revision-Date: 2009-09-28 19:56+0100\n"17"PO-Revision-Date: 2009-09-28 19:56+0100\n"
14"Last-Translator: Guillaume Delacour <gui@iroqwa.org>\n"18"Last-Translator: Guillaume Delacour <gui@iroqwa.org>\n"
15"Language-Team: French <debian-l10n-french@lists.debian.org>\n"19"Language-Team: French <debian-l10n-french@lists.debian.org>\n"
1620
=== modified file 'debian/po/it.po'
--- debian/po/it.po 2009-12-30 18:46:34 +0000
+++ debian/po/it.po 2010-02-12 23:42:15 +0000
@@ -7,7 +7,11 @@
7msgstr ""7msgstr ""
8"Project-Id-Version: zabbix 1:1.6.6 italian debconf templates\n"8"Project-Id-Version: zabbix 1:1.6.6 italian debconf templates\n"
9"Report-Msgid-Bugs-To: zabbix@packages.debian.org\n"9"Report-Msgid-Bugs-To: zabbix@packages.debian.org\n"
10<<<<<<< TREE
10"POT-Creation-Date: 2009-12-30 18:48+0100\n"11"POT-Creation-Date: 2009-12-30 18:48+0100\n"
12=======
13"POT-Creation-Date: 2009-11-05 14:09+0100\n"
14>>>>>>> MERGE-SOURCE
11"PO-Revision-Date: 2009-10-04 15:51+0200\n"15"PO-Revision-Date: 2009-10-04 15:51+0200\n"
12"Last-Translator: Luca Monducci <luca.mo@tiscali.it>\n"16"Last-Translator: Luca Monducci <luca.mo@tiscali.it>\n"
13"Language-Team: Italian <debian-l10n-italian@lists.debian.org>\n"17"Language-Team: Italian <debian-l10n-italian@lists.debian.org>\n"
1418
=== modified file 'debian/po/pt.po'
--- debian/po/pt.po 2009-12-30 18:46:34 +0000
+++ debian/po/pt.po 2010-02-12 23:42:15 +0000
@@ -7,7 +7,11 @@
7msgstr ""7msgstr ""
8"Project-Id-Version: zabbix 1.1.3-1\n"8"Project-Id-Version: zabbix 1.1.3-1\n"
9"Report-Msgid-Bugs-To: zabbix@packages.debian.org\n"9"Report-Msgid-Bugs-To: zabbix@packages.debian.org\n"
10<<<<<<< TREE
10"POT-Creation-Date: 2009-12-30 18:48+0100\n"11"POT-Creation-Date: 2009-12-30 18:48+0100\n"
12=======
13"POT-Creation-Date: 2009-11-05 14:09+0100\n"
14>>>>>>> MERGE-SOURCE
11"PO-Revision-Date: 2009-10-07 10:00+0100\n"15"PO-Revision-Date: 2009-10-07 10:00+0100\n"
12"Last-Translator: Tiago Fernandes <tjg.fernandes@gmail.com>\n"16"Last-Translator: Tiago Fernandes <tjg.fernandes@gmail.com>\n"
13"Language-Team: Portuguese <traduz@debianpt.org>\n"17"Language-Team: Portuguese <traduz@debianpt.org>\n"
1418
=== modified file 'debian/po/ru.po'
--- debian/po/ru.po 2009-12-30 18:46:34 +0000
+++ debian/po/ru.po 2010-02-12 23:42:15 +0000
@@ -9,7 +9,11 @@
9msgstr ""9msgstr ""
10"Project-Id-Version: zabbix 1:1.6.6-1\n"10"Project-Id-Version: zabbix 1:1.6.6-1\n"
11"Report-Msgid-Bugs-To: zabbix@packages.debian.org\n"11"Report-Msgid-Bugs-To: zabbix@packages.debian.org\n"
12<<<<<<< TREE
12"POT-Creation-Date: 2009-12-30 18:48+0100\n"13"POT-Creation-Date: 2009-12-30 18:48+0100\n"
14=======
15"POT-Creation-Date: 2009-11-05 14:09+0100\n"
16>>>>>>> MERGE-SOURCE
13"PO-Revision-Date: 2009-10-04 13:02+0400\n"17"PO-Revision-Date: 2009-10-04 13:02+0400\n"
14"Last-Translator: Sergey Alyoshin <alyoshin.s@gmail.com>\n"18"Last-Translator: Sergey Alyoshin <alyoshin.s@gmail.com>\n"
15"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n"19"Language-Team: Russian <debian-l10n-russian@lists.debian.org>\n"
1620
=== modified file 'debian/po/sv.po'
--- debian/po/sv.po 2009-12-30 18:46:34 +0000
+++ debian/po/sv.po 2010-02-12 23:42:15 +0000
@@ -9,7 +9,11 @@
9msgstr ""9msgstr ""
10"Project-Id-Version: zabbix debconf\n"10"Project-Id-Version: zabbix debconf\n"
11"Report-Msgid-Bugs-To: zabbix@packages.debian.org\n"11"Report-Msgid-Bugs-To: zabbix@packages.debian.org\n"
12<<<<<<< TREE
12"POT-Creation-Date: 2009-12-30 18:48+0100\n"13"POT-Creation-Date: 2009-12-30 18:48+0100\n"
14=======
15"POT-Creation-Date: 2009-11-05 14:09+0100\n"
16>>>>>>> MERGE-SOURCE
13"PO-Revision-Date: 2009-09-28 22:13+0100\n"17"PO-Revision-Date: 2009-09-28 22:13+0100\n"
14"Last-Translator: Martin Bagge <brother@bsnet.se>\n"18"Last-Translator: Martin Bagge <brother@bsnet.se>\n"
15"Language-Team: Swedish <debian-l10n-swedish@lists.debian.org>\n"19"Language-Team: Swedish <debian-l10n-swedish@lists.debian.org>\n"
1620
=== modified file 'debian/po/templates.pot'
--- debian/po/templates.pot 2010-01-28 10:42:04 +0000
+++ debian/po/templates.pot 2010-02-12 23:42:15 +0000
@@ -8,7 +8,11 @@
8msgstr ""8msgstr ""
9"Project-Id-Version: PACKAGE VERSION\n"9"Project-Id-Version: PACKAGE VERSION\n"
10"Report-Msgid-Bugs-To: zabbix@packages.debian.org\n"10"Report-Msgid-Bugs-To: zabbix@packages.debian.org\n"
11<<<<<<< TREE
11"POT-Creation-Date: 2010-01-28 11:58+0100\n"12"POT-Creation-Date: 2010-01-28 11:58+0100\n"
13=======
14"POT-Creation-Date: 2009-11-05 14:09+0100\n"
15>>>>>>> MERGE-SOURCE
12"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"16"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
13"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"17"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
14"Language-Team: LANGUAGE <LL@li.org>\n"18"Language-Team: LANGUAGE <LL@li.org>\n"
1519
=== modified file 'debian/zabbix-agent.init'
=== modified file 'debian/zabbix-frontend-php.links'
--- debian/zabbix-frontend-php.links 2010-01-28 10:42:04 +0000
+++ debian/zabbix-frontend-php.links 2010-02-12 23:42:15 +0000
@@ -1,5 +1,9 @@
1<<<<<<< TREE
1usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf usr/share/zabbix/fonts/DejaVuSans.ttf2usr/share/fonts/truetype/ttf-dejavu/DejaVuSans.ttf usr/share/zabbix/fonts/DejaVuSans.ttf
2usr/share/javascript/prototype/prototype.js usr/share/zabbix/js/prototype.js3usr/share/javascript/prototype/prototype.js usr/share/zabbix/js/prototype.js
3usr/share/javascript/scriptaculous/scriptaculous.js usr/share/zabbix/js/scriptaculous.js4usr/share/javascript/scriptaculous/scriptaculous.js usr/share/zabbix/js/scriptaculous.js
4usr/share/javascript/scriptaculous/dragdrop.js usr/share/zabbix/js/dragdrop.js5usr/share/javascript/scriptaculous/dragdrop.js usr/share/zabbix/js/dragdrop.js
5usr/share/javascript/scriptaculous/effects.js usr/share/zabbix/js/effects.js6usr/share/javascript/scriptaculous/effects.js usr/share/zabbix/js/effects.js
7=======
8usr/share/javascript/prototype/prototype.js usr/share/zabbix/js/prototype.js
9>>>>>>> MERGE-SOURCE
610
=== modified file 'debian/zabbix-proxy-mysql.zabbix-proxy.init'
=== modified file 'debian/zabbix-proxy-pgsql.zabbix-proxy.init'
=== modified file 'debian/zabbix-server-mysql.zabbix-server.init'
--- debian/zabbix-server-mysql.zabbix-server.init 2009-12-30 18:46:34 +0000
+++ debian/zabbix-server-mysql.zabbix-server.init 2010-02-12 23:42:15 +0000
@@ -25,6 +25,101 @@
25 chown -R zabbix:zabbix "$DIR"25 chown -R zabbix:zabbix "$DIR"
26fi26fi
2727
28<<<<<<< TREE
29=======
30set -e
31
32# Check if a given process pid's cmdline matches a given name
33running()
34{
35 # No pidfile, probably no daemon present
36 [ ! -f "$PIDFILE" ] && return 1
37 pid=`cat $PIDFILE`
38
39 # No pid, probably no daemon present
40 [ -z "$pid" ] && return 1
41
42 [ ! -d /proc/$pid ] && return 1
43 cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1`
44 # Is this the expected child?
45 [ "$cmd" != "$DAEMON" ] && return 1
46
47 return 0
48}
49
50# Check if a given process' childrens are running
51running_child()
52{
53 [ -z "$NAME" ] && return 1
54 if ps -eo ppid,pid,comm |grep -q $NAME; then
55 return 0
56 fi
57 return 1
58}
59
60
61
62force_stop() {
63 [ ! -e "$PIDFILE" ] && return
64 if running ; then
65 pid=`cat $PIDFILE`
66 kill -15 $pid
67 # Is it really dead?
68 [ -n "$DODTIME" ] && sleep "$DODTIME"s
69 if running ; then
70 kill -9 $pid
71 [ -n "$DODTIME" ] && sleep "$DODTIME"s
72 if running ; then
73 echo "Cannot kill $DESC (pid=$pid)!"
74 exit 1
75 fi
76 fi
77 fi
78 rm -f $PIDFILE
79}
80
81# Maybe the process is not running, but its children are
82force_child_stop()
83{
84# Kill the children by name, it's safer not to use a variable here
85 killall -15 zabbix_server
86}
87
88# Checks if the process is properly dead
89check_death()
90{
91 [ -n "$DODTIME" ] && DODTIME=2
92 [ -n "$MAX_DIETIME" ] && MAX_DIETIME=15
93 sleep "$DODTIME"s
94 if running; then
95 echo "$DESC did not stop in $DODTIME seconds, forcing it to stop"
96 force_stop
97 fi
98 if running; then
99 echo "ERROR: $DESC did not die in the expected time, consider increasing DODTIME (currently $DODTIME)"
100 exit 1
101 fi
102# Wait for the children to stop
103 if running_child; then
104 echo -n "Waiting for child processes to die"
105 force_child_stop
106 for wait in `seq $MAX_DIETIME`; do
107 if ! running_child; then break ; fi
108 echo -n "."
109 force_child_stop
110 sleep $wait
111 done
112 echo
113 fi
114 if running_child; then
115 echo "ERROR: $DESC's children processes did not die in the expected time, consider increasing MAX_DIETIME (currently $MAX_DIETIME)"
116 exit 1
117 fi
118}
119
120
121
122>>>>>>> MERGE-SOURCE
28export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"123export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
29124
30# define LSB log_* functions.125# define LSB log_* functions.
31126
=== modified file 'debian/zabbix-server-pgsql.zabbix-server.init'
--- debian/zabbix-server-pgsql.zabbix-server.init 2009-12-30 18:46:34 +0000
+++ debian/zabbix-server-pgsql.zabbix-server.init 2010-02-12 23:42:15 +0000
@@ -25,6 +25,101 @@
25 chown -R zabbix:zabbix "$DIR"25 chown -R zabbix:zabbix "$DIR"
26fi26fi
2727
28<<<<<<< TREE
29=======
30set -e
31
32# Check if a given process pid's cmdline matches a given name
33running()
34{
35 # No pidfile, probably no daemon present
36 [ ! -f "$PIDFILE" ] && return 1
37 pid=`cat $PIDFILE`
38
39 # No pid, probably no daemon present
40 [ -z "$pid" ] && return 1
41
42 [ ! -d /proc/$pid ] && return 1
43 cmd=`cat /proc/$pid/cmdline | tr "\000" "\n"|head -n 1 |cut -d : -f 1`
44 # Is this the expected child?
45 [ "$cmd" != "$DAEMON" ] && return 1
46
47 return 0
48}
49
50# Check if a given process' childrens are running
51running_child()
52{
53 [ -z "$NAME" ] && return 1
54 if ps -eo ppid,pid,comm |grep -q $NAME; then
55 return 0
56 fi
57 return 1
58}
59
60
61
62force_stop() {
63 [ ! -e "$PIDFILE" ] && return
64 if running ; then
65 pid=`cat $PIDFILE`
66 kill -15 $pid
67 # Is it really dead?
68 [ -n "$DODTIME" ] && sleep "$DODTIME"s
69 if running ; then
70 kill -9 $pid
71 [ -n "$DODTIME" ] && sleep "$DODTIME"s
72 if running ; then
73 echo "Cannot kill $DESC (pid=$pid)!"
74 exit 1
75 fi
76 fi
77 fi
78 rm -f $PIDFILE
79}
80
81# Maybe the process is not running, but its children are
82force_child_stop()
83{
84# Kill the children by name, it's safer not to use a variable here
85 killall -15 zabbix_server
86}
87
88# Checks if the process is properly dead
89check_death()
90{
91 [ -n "$DODTIME" ] && DODTIME=2
92 [ -n "$MAX_DIETIME" ] && MAX_DIETIME=15
93 sleep "$DODTIME"s
94 if running; then
95 echo "$DESC did not stop in $DODTIME seconds, forcing it to stop"
96 force_stop
97 fi
98 if running; then
99 echo "ERROR: $DESC did not die in the expected time, consider increasing DODTIME (currently $DODTIME)"
100 exit 1
101 fi
102# Wait for the children to stop
103 if running_child; then
104 echo -n "Waiting for child processes to die"
105 force_child_stop
106 for wait in `seq $MAX_DIETIME`; do
107 if ! running_child; then break ; fi
108 echo -n "."
109 force_child_stop
110 sleep $wait
111 done
112 echo
113 fi
114 if running_child; then
115 echo "ERROR: $DESC's children processes did not die in the expected time, consider increasing MAX_DIETIME (currently $MAX_DIETIME)"
116 exit 1
117 fi
118}
119
120
121
122>>>>>>> MERGE-SOURCE
28export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"123export PATH="${PATH:+$PATH:}/usr/sbin:/sbin"
29124
30# define LSB log_* functions.125# define LSB log_* functions.

Subscribers

People subscribed via source and target branches

to all changes: