diff options
author | root <root@dasajuma.(none)> | 2010-09-02 10:26:04 +0200 |
---|---|---|
committer | root <root@dasajuma.(none)> | 2010-09-02 10:26:04 +0200 |
commit | 8e0d211bf674953f2830830e27cb80a8b720ef17 (patch) | |
tree | a7814d6dd37b84476628e51d9fcb5f3ea98bba8e /config/chroot_local-hooks/04-cleanup | |
download | kanotix-8e0d211bf674953f2830830e27cb80a8b720ef17.zip kanotix-8e0d211bf674953f2830830e27cb80a8b720ef17.tar.gz |
Initial commit
Diffstat (limited to 'config/chroot_local-hooks/04-cleanup')
-rwxr-xr-x | config/chroot_local-hooks/04-cleanup | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/config/chroot_local-hooks/04-cleanup b/config/chroot_local-hooks/04-cleanup new file mode 100755 index 0000000..cae7860 --- /dev/null +++ b/config/chroot_local-hooks/04-cleanup @@ -0,0 +1,36 @@ +#!/bin/sh +#apt-get remove --yes --purge aptitude dselect nano vim-tiny libdiscover1 resolvconf +apt-get remove --yes --purge nano vim-tiny libdiscover1 resolvconf +/usr/sbin/remove-orphans || true +# Removing unused files +find . -name *~ | xargs rm -f +# Cleaning apt lists +rm -rf /var/lib/apt/lists +mkdir -p /var/lib/apt/lists/partial +# Cleaning apt cache +rm -rf /var/cache/apt +mkdir -p /var/cache/apt/archives/partial +# Truncating logs +for FILE in $(find /var/log/ -type f) +do + : > ${FILE} +done +# custom cleanup +rm -f /var/lib/apt/lists/* || true +rm -f /var/cache/apt/*.bin +dpkg --clear-avail +apt-cache gencaches +update-pciids || true +rm -f /usr/share/misc/pci.ids.* +update-usbids || true +rm -f /var/lib/usbutils/usb.ids.* +# Force old autologin +rm -rf /etc/default/kdm.d +# Some application defaults +update-alternatives --set pager /usr/bin/most || true +update-alternatives --set x-window-manager /usr/bin/openbox || true +update-alternatives --set x-window-manager /usr/bin/kwin || true +update-alternatives --set x-www-browser /usr/bin/iceweasel || true +update-alternatives --set x-session-manager /usr/bin/startlxde || true +update-alternatives --set x-session-manager /usr/bin/startkde || true +update-alternatives --set editor /usr/bin/vim.basic || true |