[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: logging apt-get/dpkg activity



Colin Watson <cjwatson@debian.org> writes:

> Probably both. Has anyone been interested enough to implement it
> themselves and send a patch?

     I suspect the easy availability of script(1) discouraged people
from expending any effort on it.  I finally got tired of editing out
all the bogus newlines (^M) from script's output, so I wrote the
following wrapper for apt-get, which I have installed as
/usr/local/bin/upgrade:

#! /bin/bash
# A script to wrap `apt-get -dist-upgrade' to keep a log of upgrades

echo -e "\n\n `date`\n">>upgrade_log
apt-get -qu dist-upgrade 2>&1 |tee -a upgrade_log
exit 0

     This contains several bashisms, so it shouldn't be run with
#!/bin/sh.  You still have to stand by to answer apt's and debconf's
questions. 

HTH

Bob
-- 
   _
  |_)  _  |_    Robert D. Hilliard        <hilliard@debian.org>
  |_) (_) |_)   1294 S.W. Seagull Way     <bob@bobhilliard.net>
                Palm City, FL 34990 USA   GPG Key ID: 390D6559 
                                            



Reply to: