#! /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 }