~ubuntu-branches/ubuntu/lucid/installation-report/lucid

« back to all changes in this revision

Viewing changes to prebaseconfig.d/94save-logs

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2006-03-14 13:23:33 UTC
  • Revision ID: james.westby@ubuntu.com-20060314132333-s1pc6c0p898zmf47
Tags: 2.12ubuntu1
* Resynchronise with Debian.
* Backport from trunk (Joey Hess):
  - Moved cdebconf db saving into 93save-debconf, from prebaseconfig.
  - Change permissions of log files and cdebconf files to 600 to guard
    against any possible leakage of sensitive data.
  - Update bugreport hook script to deal with unreadable files.
* Needs prebaseconfig 1.15ubuntu1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh
2
2
# Intentionally not set -e.
3
 
 
4
3
logsavedir=/target/var/log/installer
5
4
 
6
 
test -d $logsavedir || mkdir $logsavedir
7
 
# Transition support for the old logsavedir /var/log/debian-installer
8
 
if [ ! -L /target/var/log/debian-installer ]; then
9
 
        ln -s installer /target/var/log/debian-installer
10
 
fi
 
5
mkdir -p $logsavedir/cdebconf
 
6
 
 
7
# Make sure debconf has saved the database.
 
8
db_x_save
11
9
 
12
10
cp /var/log/* $logsavedir
 
11
chmod 600 $logsavedir/*
 
12
chmod 755 $logsavedir/cdebconf # done this way for idempotency
 
13
 
13
14
report-hw > $logsavedir/hardware-summary
14
15
cp /var/lib/dpkg/status $logsavedir
15
16
cp /etc/lsb-release $logsavedir
 
17
 
 
18
cp /var/lib/cdebconf/questions.dat /var/lib/cdebconf/templates.dat \
 
19
        $logsavedir/cdebconf
 
20
chmod 600 $logsavedir/cdebconf/*