#!/bin/bash # Filename: ${GRML_FAI_CONFIG}/config/scripts/RELEASE/98-clean-chroot # Purpose: clean up $HOMEs for release # Authors: grml-team (grml.org), (c) Michael Prokop # Bug-Reports: see http://grml.org/bugs/ # License: This file is licensed under the GPL v2 or any later version. ################################################################################ set -u set -e echo "Removing /var/lib/apt/lists/*-stuff, dpkg-status-old and pkgcache.bin" rm -f $target/var/lib/apt/lists/*Packages \ $target/var/lib/apt/lists/*Release \ $target/var/lib/apt/lists/*Sources \ $target/var/lib/apt/lists/*Index* \ $target/var/lib/apt/lists/*Translation* \ $target/var/lib/apt/lists/*.gpg \ $target/var/cache/apt-show-versions/* \ $target/var/cache/debconf/*.dat-old \ $target/var/cache/apt/*.bin echo "Removing /var/lib/aptitude/pkgstates.old" rm -f "${target}/var/lib/aptitude/pkgstates.old" # Remove all FAI logs from chroot via grml-live later then echo "Setting up /etc/grml_fai_release for grml-live" touch $target/etc/grml_fai_release echo "Removing all files inside /root" rm -rf $target/root mkdir -m 0755 $target/root echo "Removing all files inside /home/grml" rm -rf $target/home/grml mkdir -m 0755 $target/home/grml ## END OF FILE ################################################################# # vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2