[Pkg-stud-maintainers] Bug#725797: Proposed patch to fix the restart problem

Louis Bouchard louis.bouchard at canonical.com
Tue Oct 8 14:21:21 UTC 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

Attached to this mail is a debdiff against sid's version of stud which
includes the identical patch that I am planning to apply to Ubuntu's
version of the stud package.

If possible, could someone in the maintaining team review the proposed
patch and let me know if this is satisfactory to you ?

Kind regards,

...Louis

- -- 
Louis Bouchard
Software engineer, Cloud & Sustaining eng.
Canonical Ltd
Ubuntu support: http://canonical.com/support
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iEYEARECAAYFAlJUFNsACgkQDvqokHrhnCyfWQCeLPkV0spsNfuFFbN/GlV/QEfc
3wUAoIlBd5yS4M4DlY2tN1avnCJOzlhz
=WQX8
-----END PGP SIGNATURE-----
-------------- next part --------------
diff -Nru stud-0.3/debian/changelog stud-0.3/debian/changelog
--- stud-0.3/debian/changelog	2013-06-08 23:11:29.000000000 +0200
+++ stud-0.3/debian/changelog	2013-10-08 16:07:09.000000000 +0200
@@ -1,3 +1,13 @@
+stud (0.3-5.1) UNRELEASED; urgency=low
+
+  * Fixes failure to run invoke-rc.d stud restart 
+    Closes: #725797
+    Use of --pidfile with start-stop-daemon failed to kill the children.
+    It is important to avoid running stud as 'root' as stated in the README.md
+    since running invoke-rc.d stud stop will kill the initscript.
+
+ -- Louis Bouchard <louis.bouchard at ubuntu.com>  Tue, 08 Oct 2013 15:02:58 +0200
+
 stud (0.3-5) unstable; urgency=low
 
   * Fix FTBFS when using --as-needed on non x86 arch.
diff -Nru stud-0.3/debian/stud.init.d stud-0.3/debian/stud.init.d
--- stud-0.3/debian/stud.init.d	2013-06-08 23:11:29.000000000 +0200
+++ stud-0.3/debian/stud.init.d	2013-10-08 15:57:53.000000000 +0200
@@ -52,12 +52,12 @@
 			BASE=$(basename $conf)
 			PIDFILE=/var/run/stud.${BASE}.pid
 			. $conf
-			if ! start-stop-daemon --start --quiet --pidfile $PIDFILE \
+			if ! start-stop-daemon --start --quiet \
 				--exec $DAEMON --test > /dev/null; then
 				[ "$VERBOSE" != no ] && log_progress_msg "[Already running: ${BASE}]"
 			else
-				start-stop-daemon --start --quiet --pidfile $PIDFILE \
-					--exec $DAEMON -b -m -- \
+				start-stop-daemon --start --quiet \
+					--exec $DAEMON -b -- \
 					$COMMON_OPTIONS $OPTIONS $CERT \
 				|| {
 					[ "$VERBOSE" != no ] && log_progress_msg "[Failed: ${BASE}]"
@@ -86,7 +86,7 @@
 			PIDFILE=/var/run/stud.${BASE}.pid
 			. $conf
 			start-stop-daemon --stop --quiet --retry=TERM/10/KILL/5 \
-				--pidfile $PIDFILE --name $NAME
+				--name $NAME --user $USER
 			RETVAL="$?"
 			if [ "$RETVAL" = 2 ]; then
 				[ "$VERBOSE" != no ] && log_progress_msg "[Unable to stop: ${BASE}]"
@@ -111,7 +111,7 @@
 	# restarting (for example, when it is sent a SIGHUP),
 	# then implement that here.
 	#
-	start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME
+	start-stop-daemon --stop --signal 1 --quiet --name $NAME
 	return 0
 }
 


More information about the Pkg-stud-maintainers mailing list