1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
#! /bin/bash
# This file is sourced during task_setup
# you can define your own functions and use them later, for e.g.
# in scripts/...
cleanup_base() {
rm -f $target/etc/mailname \
$target/etc/machine-id \
$target/var/lib/dbus/machine-id \
$target/var/log/install_packages.list
> $target/etc/machine-id
shred --remove $target/etc/ssh/ssh_host_*
}
cleanup_dpkg_apt() {
rm -f $target/var/log/alternatives.log \
$target/var/log/apt/* \
$target/var/log/bootstrap.log \
$target/var/log/dpkg.log
rm -rf $target/var/cache/apt/*
rm -rf $target/var/lib/apt/lists/*
rm -f $target/var/lib/dpkg/available*
rm -f -- $target/var/lib/dpkg/*-old
}
|