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