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. Cheers ------ 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'
unattended-upgrades
Description: Binary data