[mythtv-users] upgrade

Alistair Grant akgrant0710 at gmail.com
Tue Aug 19 08:50:34 UTC 2014


On Tue, Aug 19, 2014 at 9:20 AM, Vincent McIntyre
<vincent.mcintyre at gmail.com> wrote:
> On 8/19/14, Mark Perkins <perkins1724 at hotmail.com> wrote:
> ...
>
>> sudo su -
>> apt-get update
>> apt-get -y dist-upgrade 2>&1 | tee /home/daryl/tmp_apt-get_log.log
>> /etc/init.d/mythtv-backend stop
>> do-release-upgrade 2>&1 | tee /home/daryl/tmp_upgrade_log.log
>> reboot
>>
>> The aim of what I am suggesting is to get a copy of the output into a temp
>> log file (and to screen while it is happening) so you can easily browse from
>> your desktop and copy / paste from (if necessary) later. Hopefully someone
>> can fine-tune the syntax appropriately.
>>
>
> another log-recording option
>
> sudo su -
> cd /home/daryl
> script upgrade.log
> apt-get update
> apt-get -y dist-upgrade
> /etc/init.d/mythtv-backend stop
> do-release-upgrade
> exit                             # this stops 'script' recording
> reboot
>
> 'script' captures all commands and their output (including backspaces,
> etc) in a single file.
> The log may be difficult to read if you get prompted about
> configuration changes because
> there may be escape characters embedded, but I suspect no worse than
> Mark's method.

Since we're talking about terminal logging... I have the following in
my .bashrc, it automatically creates a log file for every terminal
session.  I store the logs in /run/shm, which means that they are lost
when the system reboots, but I'm not normally trying to capture output
across system crashes.

if [ -z "$UNDER_SCRIPT" ]; then
        logdir=/dev/shm/akglogs
        if [ ! -d $logdir ]; then
                mkdir $logdir
        fi
        logfile=$logdir/$(date +%F_%T).$$.log
        export UNDER_SCRIPT=$logfile
        script -f -q $logfile
        exit
fi


To help tidy up the logs and make them more readable, see
http://superuser.com/questions/99128/removing-the-escape-characters-from-gnu-screens-screenlog-n

HTH,
Alistair


More information about the mythtv-users mailing list