~asac/live-build/virtual-hdd-mtab-hack

« back to all changes in this revision

Viewing changes to hooks/minimal

  • Committer: Daniel Baumann
  • Date: 2009-11-22 13:38:00 UTC
  • Revision ID: git-v1:a62f12110b19a52a58d7eae871012202cfa16055
Renaming categories to archive areas (Closes: #519690).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
 
 
3
# /usr/share/live-helper/hooks/minimal - hook list for live-helper(7)
 
4
# Copyright (C) 2006-2009 Daniel Baumann <daniel@debian.org>
 
5
#
 
6
# live-helper comes with ABSOLUTELY NO WARRANTY; for details see COPYING.
 
7
# This is free software, and you are welcome to redistribute it
 
8
# under certain conditions; see COPYING for details.
 
9
 
 
10
set -e
 
11
 
 
12
# Removing unused packages
 
13
for PACKAGE in apt-utils aptitude man-db manpages info wget
 
14
do
 
15
        if ! apt-get remove --purge --yes "${PACKAGE}"
 
16
        then
 
17
                echo "WARNING: ${PACKAGE} isn't installed"
 
18
        fi
 
19
done
 
20
 
 
21
apt-get autoremove --yes || true
 
22
 
 
23
# Removing unused files
 
24
find . -name *~ -print0 | xargs -0 rm -f
 
25
 
 
26
rm -rf /var/cache/man/*
 
27
 
 
28
# Truncating logs
 
29
for FILE in $(find /var/log/ -type f)
 
30
do
 
31
        : > ${FILE}
 
32
done