Your message dated Mon, 22 Jun 2015 07:34:14 +0000
with message-id <[email protected]>
and subject line Bug#788573: fixed in nginx 1.9.2-1
has caused the Debian Bug report #788573,
regarding initscript doesn't preserve return code
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
788573: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=788573
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: nginx
Version: 1.9.1-1

Many actions offered by the initscript do not preserve or give the
proper return code. One notable example is the "configtest" that always
returns 0 even when problems are detected:

 echo "invalid" >> /etc/nging/nginx.conf
 service nginx configtest
 echo $?

Should return 1 but returns 0 instead.

The attached patch makes the initscript preserve the return code for all
supported actions.

Regards,
Simon
--- nginx-common.nginx.init.orig	2015-06-12 16:01:06.000000000 -0400
+++ nginx-common.nginx.init	2015-06-12 16:02:48.438224547 -0400
@@ -127,19 +127,19 @@
 
 case "$1" in
 	start)
-		[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
+		log_daemon_msg "Starting $DESC" "$NAME"
 		do_start
 		case "$?" in
-			0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
-			2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+			0|1) log_end_msg 0 ;;
+			2)   log_end_msg 1 ;;
 		esac
 		;;
 	stop)
-		[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
+		log_daemon_msg "Stopping $DESC" "$NAME"
 		do_stop
 		case "$?" in
-			0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
-			2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
+			0|1) log_end_msg 0 ;;
+			2)   log_end_msg 1 ;;
 		esac
 		;;
 	restart)
@@ -148,7 +148,7 @@
 		# Check configuration before stopping nginx
 		if ! test_nginx_config; then
 			log_end_msg 1 # Configuration error
-			exit 0
+			exit $?
 		fi
 
 		do_stop
@@ -178,7 +178,7 @@
 		# to the administrator.
 		if ! test_nginx_config; then
 			log_end_msg 1 # Configuration error
-			exit 0
+			exit $?
 		fi
 
 		do_reload
@@ -190,12 +190,12 @@
 		log_end_msg $?
 		;;
 	status)
-		status_of_proc -p $PID "$DAEMON" "$NAME" && exit 0 || exit $?
+		status_of_proc -p $PID "$DAEMON" "$NAME"
 		;;
 	upgrade)
 		log_daemon_msg "Upgrading binary" "$NAME"
 		do_upgrade
-		log_end_msg 0
+		log_end_msg $?
 		;;
 	rotate)
 		log_daemon_msg "Re-opening $DESC log files" "$NAME"
@@ -207,5 +207,3 @@
 		exit 3
 		;;
 esac
-
-:

--- End Message ---
--- Begin Message ---
Source: nginx
Source-Version: 1.9.2-1

We believe that the bug you reported is fixed in the latest version of
nginx, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to [email protected],
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Christos Trochalakis <[email protected]> (supplier of updated nginx package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing [email protected])


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Format: 1.8
Date: Mon, 22 Jun 2015 10:16:19 +0300
Source: nginx
Binary: nginx nginx-doc nginx-common nginx-full nginx-full-dbg nginx-light 
nginx-light-dbg nginx-extras nginx-extras-dbg
Architecture: source all amd64
Version: 1.9.2-1
Distribution: unstable
Urgency: medium
Maintainer: Kartik Mistry <[email protected]>
Changed-By: Christos Trochalakis <[email protected]>
Description:
 nginx      - small, powerful, scalable web/proxy server
 nginx-common - small, powerful, scalable web/proxy server - common files
 nginx-doc  - small, powerful, scalable web/proxy server - documentation
 nginx-extras - nginx web/proxy server (extended version)
 nginx-extras-dbg - nginx web/proxy server (extended version) - debugging 
symbols
 nginx-full - nginx web/proxy server (standard version)
 nginx-full-dbg - nginx web/proxy server (standard version) - debugging symbols
 nginx-light - nginx web/proxy server (basic version)
 nginx-light-dbg - nginx web/proxy server (basic version) - debugging symbols
Closes: 788573
Changes:
 nginx (1.9.2-1) unstable; urgency=medium
 .
   [ Michael Lustfield ]
   * debian/nginx-common.nginx.init:
     + Init script now returns the proper exit status. (Closes: #788573)
     + Cleaned up the init script to have consistent naming/structure.
 .
   [ Christos Trochalakis ]
   * New upstream Release.
   * debian/rules:
     + Add stream module to nginx-full & nginx-extras.
     + Add thread pool support to nginx-full & nginx-extras.
   * debian/modules/nginx-lua:
     + Backport upstream's 9531e5e7 fixing build failure when thread pool
       support is enabled.
Checksums-Sha1:
 9065b565d4fe3cfb6e0b34f94da5bacfdd5d781d 2807 nginx_1.9.2-1.dsc
 814855ab98d6b0900207a6e5307252b130af61a2 860233 nginx_1.9.2.orig.tar.gz
 0a36ff05e5eafe374c34cc0b25e597fad9f9c1c0 613760 nginx_1.9.2-1.debian.tar.xz
 bcc4125d95dac0c0e973df539d6480bee3a66cd0 96048 nginx-common_1.9.2-1_all.deb
 6fb6826eeb1015d5f3970bffbff2458a12b303f2 87594 nginx-doc_1.9.2-1_all.deb
 004f1a862f84a1039c6fca201e91dfddfc7b874a 5521778 
nginx-extras-dbg_1.9.2-1_amd64.deb
 65ec559ddc7ce69d6ca6c5071d549b2ad9b3bb3c 660058 nginx-extras_1.9.2-1_amd64.deb
 07a2f36e01e1205245b5811dd36aa9d55f0c490d 3632654 
nginx-full-dbg_1.9.2-1_amd64.deb
 8175865d28d58b1b6b3c7a9ee5a444a9d460f531 486340 nginx-full_1.9.2-1_amd64.deb
 eef42b29b215fb31325d69bb8449e962d3c6f1e1 2355670 
nginx-light-dbg_1.9.2-1_amd64.deb
 653a7965b54cff09d45399afbe98ffac94d03d3c 365632 nginx-light_1.9.2-1_amd64.deb
 f559965a10d384ca01151dcf7a6e168b66d8f072 76072 nginx_1.9.2-1_all.deb
Checksums-Sha256:
 3021bdfc3d4fb365b267765d7ed1afc41273fbfa53e248f8c299310de80f7950 2807 
nginx_1.9.2-1.dsc
 80b6425be14a005c8cb15115f3c775f4bc06bf798aa1affaee84ed9cf641ed78 860233 
nginx_1.9.2.orig.tar.gz
 387005bd79df09bccece2492974f92598057b61379b4eb23efccbf0ed959a66e 613760 
nginx_1.9.2-1.debian.tar.xz
 b140152acfbd8689ea4b3edb3b1a1ef30f9678e54ffa0dc51f91acdc2494341b 96048 
nginx-common_1.9.2-1_all.deb
 cf04d1f1ac5cd2bab0ef1da0b5b74727d199c84da1f9df61d55b00c127dc0072 87594 
nginx-doc_1.9.2-1_all.deb
 7018116eda6af11b6ebb9e08f74f387363c29afa9cbc47784613fb3c2005884e 5521778 
nginx-extras-dbg_1.9.2-1_amd64.deb
 f996127149beb1bdfcef9ef8afa794d96ab0aa7e742ee1046071b142c49bcf08 660058 
nginx-extras_1.9.2-1_amd64.deb
 1d09b5a135a0e200c409dd44d70193e752794e1fdfbc6739538bc9b33ab3a11b 3632654 
nginx-full-dbg_1.9.2-1_amd64.deb
 eb75462541589a64297aa8bf5cf283842c8046ee0a5ebfb6f718767d740f8fca 486340 
nginx-full_1.9.2-1_amd64.deb
 04c0c376f3b92a3a8f3965d9d0bb57f265eb2dec6c1a00bbae5a7e54040c34aa 2355670 
nginx-light-dbg_1.9.2-1_amd64.deb
 24555d9ee9c16fc2fd9ccd217682566887c140a3058f1945d1458185be7d7fbb 365632 
nginx-light_1.9.2-1_amd64.deb
 80e1ceb9a061c3434e02658ae0d93d07222624540b2913c1d263cc4bd935c92d 76072 
nginx_1.9.2-1_all.deb
Files:
 bc5977651f95377d6d96e88d21bd7889 2807 httpd optional nginx_1.9.2-1.dsc
 572a0f217f845d3592b5ca779066d1c3 860233 httpd optional nginx_1.9.2.orig.tar.gz
 25acbe3308a081fa66d19f05b3b97cc4 613760 httpd optional 
nginx_1.9.2-1.debian.tar.xz
 85d2e6b289f7f36eab0355dedd7aa75d 96048 httpd optional 
nginx-common_1.9.2-1_all.deb
 7ece9026752a5d12291a1d6631ae3082 87594 doc optional nginx-doc_1.9.2-1_all.deb
 5c9b319b63c365493974d8572128f4d9 5521778 debug extra 
nginx-extras-dbg_1.9.2-1_amd64.deb
 5403cee121491c608bd4c90fa0edd962 660058 httpd extra 
nginx-extras_1.9.2-1_amd64.deb
 ca417c7bf64ddb5b5bda80d75ffd7c05 3632654 debug extra 
nginx-full-dbg_1.9.2-1_amd64.deb
 180bc293dfe4c44a761b36193a2aa115 486340 httpd optional 
nginx-full_1.9.2-1_amd64.deb
 aa2fc09a874ce8117158a120c99cfa70 2355670 debug extra 
nginx-light-dbg_1.9.2-1_amd64.deb
 cb4f1bf1f53bef8ab4e330c1b25e6989 365632 httpd extra 
nginx-light_1.9.2-1_amd64.deb
 573154f35e2f4211626e0790a77c9295 76072 httpd optional nginx_1.9.2-1_all.deb

-----BEGIN PGP SIGNATURE-----

iQIcBAEBCAAGBQJVh7hRAAoJEBE2JgCnR+zZUx4P/icnujm39YIqXply2oMRILel
eRIkXMyAnbo1o1SJi0fPgJhArbHYFsXfV1zfh4fibceu+maN/Q5Zr0vhm1VbPW8Q
zC17bSOwolCfKnyyQfGGmLzsaK0l2RincrogFfyb5FK69zwNmr8qykNfNIVhwv0z
vR7xc/V9Ii6Ds8Vr+elFsWxnh2lFq4oh9dotdeSlJL4Zl5S25+mV9dvatPf23JqQ
/YF6CwsTEcer1wPvNVigLMbIDUHqE3Jjw2UVOWuV+H5otZNOES9Ep6k8vOREgR00
C/X84u3arw3dGf0bLGqAlxZrPMZIEtWUGaNiUf78Lx5GHTG65I8G0aV3rgFjG0Fo
kaHM8mPX+400tzfz9CEp+41OM85XA42RyV1XCHVF7190yGul3Ot7xp91rOVTgW1A
1DXSfCJ3wTQG2iWpEh1cLIhqFX9sLAfRPmpJo5T3LJwYEbqrlaCSyA6GRk/pZGjk
UmjtU78f5zAf2OAejDbMBwZzNg4Z8hynSipyvd0Bljs0v8DWkAhzfdRKXoiFqfBo
/rGzzp+3Mlx+F8NHXo07erl5UMWsbyfu3jzbXAHP0WtjjLsFmAOCYodNYnt7NpXr
hjcj42LODjM9wOGo6RqQOlrdd9A1qz8vO6KPs9Q1iRBCvfJSL50zYz+ORWqozV6M
xCwE7UsHuKD9Xpiq59zm
=Od0x
-----END PGP SIGNATURE-----

--- End Message ---

Reply via email to