Dear bertagaz: Thanks again for working on this!
Here are a few comments on this version of tahoe-lafs.init ¹ ¹ http://anonscm.debian.org/gitweb/?p=tahoe/tahoe.git;a=blob;f=debian/tahoe-lafs.init;h=352ee7581a9a1f52ada75e791f542fda4f68ea59 . • Re: line 50 ² this reminds me of Tahoe-LAFS ticket #725 (“We should whine if we're running as root.”) ³. I don't suggest any change to the tahoe-lafs.init script, but it makes me wonder if #725 should be hardened to "exit with an error if we're running as root". ² http://anonscm.debian.org/gitweb/?p=tahoe/tahoe.git;a=blob;f=debian/tahoe-lafs.init;h=352ee7581a9a1f52ada75e791f542fda4f68ea59#l50 ³ https://tahoe-lafs.org/trac/tahoe-lafs/ticket/725# We should whine if we're running as root. • The issue that I raised in my previous review ⁴ about how to handle one or multiple failures during a multi-node operation was fixed in a way that I like. The current version of tahoe-lafs.init ¹ tries to perform its requested operation (whether it is start, restart, or stop) on each of the requested nodes, and if the exit value from the attempt is non-zero then it sets STATUS to that exit value. This means that the final exit value of tahoe-lafs.init is 0 only if all of the attempts succeeded, else it is the exit value of the most recent attempt. This also means that if tahoe-lafs.init attempts to stop multiple nodes, and one or more of those nodes was already not-running, then the exit code from tahoe-lafs.init will be non-zero, since attempting to stop a not-running node results in a non-zero exit code. All of this sounds fine to me! The only change I would suggest is to put a comment at the top of the file stating this. ☺ Also, would it be appropriate to have the usage printout include a statement of this behavior? ⁴ http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=652003 • Other than that suggestion to add documentation (in the form of a comment and/or usage printout), I see no problem in this script. It is much shorter than earlier versions, thanks to the refactoring of start, restart, and stop into the same code and the delegation of more functionality to the underlying "tahoe" script, so it was much faster to read through it, which hopefully means it will get better review/auditing/debugging in the future. Regards, Zooko -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org