On Tue, Jun 19, 2012 at 10:31:11AM +0300, Teodor MICU wrote: > 2012/6/18 Kees de Jong <keesdej...@gmail.com>: > > unattended-upgrades doesn't seem to have a 'fancy' LSB output in the init.d > > Could you please add them? > > I've updated u-a script to be fancy! :-) > Hopefully I haven't introduced any functional changes. I've used the > example from skeleton script. > > Michael, you can adapt it to your scripting style or I can do it if > you consider something needs to be changed. > > If VERBOSE is not set nothing is printed on console. If VERBOSE is set > (in rcS) than this will be printed on console: > root@frost:~#./unattended-upgrades stop > [ ok ] Checking for running unattended package upgrades: unattended-upgrades.
Thanks a lot! I updated bzr to include your version with some small modifications. Looking at the README.Debian.gz from lsb-base it appears that log_action_begin_msg and log_action_end_msg is actually closer to what we want as the other one appears to be more for daemons and the check may take some time (usually not though of course). Please let me know if you agree with this change. I wasn't sure about VERBOSE but followed your example and left it in. It seems like a lot of the scripts in /etc/init.d do not really honor it. Please double check bzr trunk (bzr branch lp:unattended-upgrades gives it to you) if it all makes sense :) > ------ > Maybe this should be considered too? It should not attempt to open the > log file if later will have nothing to write on it. > > doru@frost:~$ ./unattended-upgrades stop > [....] Checking for running unattended package upgrades: > unattended-upgradesTraceback (most recent call last): > File "/usr/share/unattended-upgrades/unattended-upgrade-shutdown", > line 107, in <module> > format="%(asctime)s %(levelname)s - %(message)s") > File "/usr/lib/python2.7/logging/__init__.py", line 1527, in basicConfig > hdlr = FileHandler(filename, mode) > File "/usr/lib/python2.7/logging/__init__.py", line 901, in __init__ > StreamHandler.__init__(self, self._open()) > File "/usr/lib/python2.7/logging/__init__.py", line 924, in _open > stream = open(self.baseFilename, self.mode) > IOError: [Errno 13] Permission denied: > '/var/log/unattended-upgrades/unattended-upgrades-shutdown.log' Yeah, that is a valid suggestion, its a bit tricky because when it opens the logfile its not clear yet if it needs to write something to it later or not. Cheers, Michael -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org