From a189319b43604293e5713aa27bbc9611242ac466 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 19 Dec 2012 05:56:58 +0100 Subject: Renumbering hooks. --- share/hooks/0100-remove-adjtime-configuration.chroot | 11 +++++++++++ share/hooks/0110-remove-adjtime-configuration.chroot | 11 ----------- share/hooks/0110-remove-backup-files.chroot | 18 ++++++++++++++++++ share/hooks/0120-remove-apt-sources-lists.chroot | 8 -------- share/hooks/0120-remove-dbus-machine-id.chroot | 9 +++++++++ share/hooks/0130-remove-backup-files.chroot | 18 ------------------ share/hooks/0130-remove-gnome-icon-cache.chroot | 9 +++++++++ share/hooks/0140-remove-dbus-machine-id.chroot | 9 --------- share/hooks/0140-remove-log-files.chroot | 9 +++++++++ share/hooks/0150-remove-gnome-icon-cache.chroot | 9 --------- share/hooks/0150-remove-mdadm-configuration.chroot | 7 +++++++ share/hooks/0160-remove-log-files.chroot | 9 --------- .../hooks/0160-remove-openssh-server-host-keys.chroot | 10 ++++++++++ share/hooks/0170-remove-mdadm-configuration.chroot | 7 ------- share/hooks/0170-remove-python-py.chroot | 9 +++++++++ .../hooks/0180-remove-openssh-server-host-keys.chroot | 10 ---------- share/hooks/0180-remove-temporary-files.chroot | 14 ++++++++++++++ share/hooks/0190-remove-python-py.chroot | 9 --------- share/hooks/0190-remove-udev-persistent-rules.chroot | 16 ++++++++++++++++ share/hooks/0200-remove-temporary-files.chroot | 14 -------------- share/hooks/0210-remove-udev-persistent-rules.chroot | 16 ---------------- share/hooks/0910-remove-apt-sources-lists.chroot | 8 ++++++++ 22 files changed, 120 insertions(+), 120 deletions(-) create mode 100755 share/hooks/0100-remove-adjtime-configuration.chroot delete mode 100755 share/hooks/0110-remove-adjtime-configuration.chroot create mode 100755 share/hooks/0110-remove-backup-files.chroot delete mode 100755 share/hooks/0120-remove-apt-sources-lists.chroot create mode 100755 share/hooks/0120-remove-dbus-machine-id.chroot delete mode 100755 share/hooks/0130-remove-backup-files.chroot create mode 100755 share/hooks/0130-remove-gnome-icon-cache.chroot delete mode 100755 share/hooks/0140-remove-dbus-machine-id.chroot create mode 100755 share/hooks/0140-remove-log-files.chroot delete mode 100755 share/hooks/0150-remove-gnome-icon-cache.chroot create mode 100755 share/hooks/0150-remove-mdadm-configuration.chroot delete mode 100755 share/hooks/0160-remove-log-files.chroot create mode 100755 share/hooks/0160-remove-openssh-server-host-keys.chroot delete mode 100755 share/hooks/0170-remove-mdadm-configuration.chroot create mode 100755 share/hooks/0170-remove-python-py.chroot delete mode 100755 share/hooks/0180-remove-openssh-server-host-keys.chroot create mode 100755 share/hooks/0180-remove-temporary-files.chroot delete mode 100755 share/hooks/0190-remove-python-py.chroot create mode 100755 share/hooks/0190-remove-udev-persistent-rules.chroot delete mode 100755 share/hooks/0200-remove-temporary-files.chroot delete mode 100755 share/hooks/0210-remove-udev-persistent-rules.chroot create mode 100755 share/hooks/0910-remove-apt-sources-lists.chroot (limited to 'share/hooks') diff --git a/share/hooks/0100-remove-adjtime-configuration.chroot b/share/hooks/0100-remove-adjtime-configuration.chroot new file mode 100755 index 000000000..7fe5bbd15 --- /dev/null +++ b/share/hooks/0100-remove-adjtime-configuration.chroot @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +# Reset generated file + +cat > /etc/adjtime << EOF +0.0 0 0.0 +0 +UTC +EOF diff --git a/share/hooks/0110-remove-adjtime-configuration.chroot b/share/hooks/0110-remove-adjtime-configuration.chroot deleted file mode 100755 index 7fe5bbd15..000000000 --- a/share/hooks/0110-remove-adjtime-configuration.chroot +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -set -e - -# Reset generated file - -cat > /etc/adjtime << EOF -0.0 0 0.0 -0 -UTC -EOF diff --git a/share/hooks/0110-remove-backup-files.chroot b/share/hooks/0110-remove-backup-files.chroot new file mode 100755 index 000000000..55a6b75af --- /dev/null +++ b/share/hooks/0110-remove-backup-files.chroot @@ -0,0 +1,18 @@ +#!/bin/sh + +set -e + +# Remove backup files +rm -f /boot/*.bak +rm -f /boot/*.old-dkms + +rm -f /etc/apt/sources.list~ +rm -f /etc/apt/trusted.gpg~ + +rm -f /etc/passwd- +rm -f /etc/group- +rm -f /etc/shadow- +rm -f /etc/gshadow- + +rm -f /var/cache/debconf/*-old +rm -f /var/lib/dpkg/*-old diff --git a/share/hooks/0120-remove-apt-sources-lists.chroot b/share/hooks/0120-remove-apt-sources-lists.chroot deleted file mode 100755 index 1c8ca2d22..000000000 --- a/share/hooks/0120-remove-apt-sources-lists.chroot +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -set -e - -# Remove apt sources.list files - -rm -f /etc/apt/sources.list -rm -f /etc/apt/sources.list.d/*.list diff --git a/share/hooks/0120-remove-dbus-machine-id.chroot b/share/hooks/0120-remove-dbus-machine-id.chroot new file mode 100755 index 000000000..230099e46 --- /dev/null +++ b/share/hooks/0120-remove-dbus-machine-id.chroot @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +# Remove dbus machine id. +# +# This removes dbus machine id that cache that makes each system unique. + +rm -f /var/lib/dbus/machine-id diff --git a/share/hooks/0130-remove-backup-files.chroot b/share/hooks/0130-remove-backup-files.chroot deleted file mode 100755 index 55a6b75af..000000000 --- a/share/hooks/0130-remove-backup-files.chroot +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -set -e - -# Remove backup files -rm -f /boot/*.bak -rm -f /boot/*.old-dkms - -rm -f /etc/apt/sources.list~ -rm -f /etc/apt/trusted.gpg~ - -rm -f /etc/passwd- -rm -f /etc/group- -rm -f /etc/shadow- -rm -f /etc/gshadow- - -rm -f /var/cache/debconf/*-old -rm -f /var/lib/dpkg/*-old diff --git a/share/hooks/0130-remove-gnome-icon-cache.chroot b/share/hooks/0130-remove-gnome-icon-cache.chroot new file mode 100755 index 000000000..ab35a1d68 --- /dev/null +++ b/share/hooks/0130-remove-gnome-icon-cache.chroot @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +# Remove GNOME icon cache. +# +# This saves space some space. + +rm -f /usr/share/icons/*/icon-theme.cache diff --git a/share/hooks/0140-remove-dbus-machine-id.chroot b/share/hooks/0140-remove-dbus-machine-id.chroot deleted file mode 100755 index 230099e46..000000000 --- a/share/hooks/0140-remove-dbus-machine-id.chroot +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -set -e - -# Remove dbus machine id. -# -# This removes dbus machine id that cache that makes each system unique. - -rm -f /var/lib/dbus/machine-id diff --git a/share/hooks/0140-remove-log-files.chroot b/share/hooks/0140-remove-log-files.chroot new file mode 100755 index 000000000..f95e54686 --- /dev/null +++ b/share/hooks/0140-remove-log-files.chroot @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +# Truncate log files +for _FILE in $(find /var/log/ -type f) +do + : > ${_FILE} +done diff --git a/share/hooks/0150-remove-gnome-icon-cache.chroot b/share/hooks/0150-remove-gnome-icon-cache.chroot deleted file mode 100755 index ab35a1d68..000000000 --- a/share/hooks/0150-remove-gnome-icon-cache.chroot +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -set -e - -# Remove GNOME icon cache. -# -# This saves space some space. - -rm -f /usr/share/icons/*/icon-theme.cache diff --git a/share/hooks/0150-remove-mdadm-configuration.chroot b/share/hooks/0150-remove-mdadm-configuration.chroot new file mode 100755 index 000000000..206b494da --- /dev/null +++ b/share/hooks/0150-remove-mdadm-configuration.chroot @@ -0,0 +1,7 @@ +#!/bin/sh + +set -e + +# Remove generated files + +rm -f /etc/mdadm/mdadm.conf diff --git a/share/hooks/0160-remove-log-files.chroot b/share/hooks/0160-remove-log-files.chroot deleted file mode 100755 index f95e54686..000000000 --- a/share/hooks/0160-remove-log-files.chroot +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -set -e - -# Truncate log files -for _FILE in $(find /var/log/ -type f) -do - : > ${_FILE} -done diff --git a/share/hooks/0160-remove-openssh-server-host-keys.chroot b/share/hooks/0160-remove-openssh-server-host-keys.chroot new file mode 100755 index 000000000..862704981 --- /dev/null +++ b/share/hooks/0160-remove-openssh-server-host-keys.chroot @@ -0,0 +1,10 @@ +#!/bin/sh + +set -e + +# Remove OpenSSH Host Keys. +# +# This removes openssh-server host keys, they are regenerated by live-config +# on system start. + +rm -f /etc/ssh/ssh_host_*_key /etc/ssh/ssh_host_*_key.pub diff --git a/share/hooks/0170-remove-mdadm-configuration.chroot b/share/hooks/0170-remove-mdadm-configuration.chroot deleted file mode 100755 index 206b494da..000000000 --- a/share/hooks/0170-remove-mdadm-configuration.chroot +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -set -e - -# Remove generated files - -rm -f /etc/mdadm/mdadm.conf diff --git a/share/hooks/0170-remove-python-py.chroot b/share/hooks/0170-remove-python-py.chroot new file mode 100755 index 000000000..ff705838f --- /dev/null +++ b/share/hooks/0170-remove-python-py.chroot @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +# Remove Python *.py files. +# +# This removes byte-compiled Python modules to save some space. + +find /usr -name "*.pyc" -print0 | xargs -0r rm -f diff --git a/share/hooks/0180-remove-openssh-server-host-keys.chroot b/share/hooks/0180-remove-openssh-server-host-keys.chroot deleted file mode 100755 index 862704981..000000000 --- a/share/hooks/0180-remove-openssh-server-host-keys.chroot +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/sh - -set -e - -# Remove OpenSSH Host Keys. -# -# This removes openssh-server host keys, they are regenerated by live-config -# on system start. - -rm -f /etc/ssh/ssh_host_*_key /etc/ssh/ssh_host_*_key.pub diff --git a/share/hooks/0180-remove-temporary-files.chroot b/share/hooks/0180-remove-temporary-files.chroot new file mode 100755 index 000000000..fd220e030 --- /dev/null +++ b/share/hooks/0180-remove-temporary-files.chroot @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +# Remove temporary files +rm -rf /var/cache/man/* + +for _DIRECTORY in /tmp /var/tmp +do + rm -rf ${_DIRECTORY} + + mkdir -p ${_DIRECTORY} + chmod 1777 ${_DIRECTORY} +done diff --git a/share/hooks/0190-remove-python-py.chroot b/share/hooks/0190-remove-python-py.chroot deleted file mode 100755 index ff705838f..000000000 --- a/share/hooks/0190-remove-python-py.chroot +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -set -e - -# Remove Python *.py files. -# -# This removes byte-compiled Python modules to save some space. - -find /usr -name "*.pyc" -print0 | xargs -0r rm -f diff --git a/share/hooks/0190-remove-udev-persistent-rules.chroot b/share/hooks/0190-remove-udev-persistent-rules.chroot new file mode 100755 index 000000000..148ba30d1 --- /dev/null +++ b/share/hooks/0190-remove-udev-persistent-rules.chroot @@ -0,0 +1,16 @@ +#!/bin/sh + +set -e + +# Remove udev persistent rules. +# +# This removes udev persistent rules that cache the host systems mac address to +# remember its device name. + +for _FILE in /etc/udev/rules.d/*persistent-net.rules +do + if [ -e "${_FILE}" ] + then + : > ${_FILE} + fi +done diff --git a/share/hooks/0200-remove-temporary-files.chroot b/share/hooks/0200-remove-temporary-files.chroot deleted file mode 100755 index fd220e030..000000000 --- a/share/hooks/0200-remove-temporary-files.chroot +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -set -e - -# Remove temporary files -rm -rf /var/cache/man/* - -for _DIRECTORY in /tmp /var/tmp -do - rm -rf ${_DIRECTORY} - - mkdir -p ${_DIRECTORY} - chmod 1777 ${_DIRECTORY} -done diff --git a/share/hooks/0210-remove-udev-persistent-rules.chroot b/share/hooks/0210-remove-udev-persistent-rules.chroot deleted file mode 100755 index 148ba30d1..000000000 --- a/share/hooks/0210-remove-udev-persistent-rules.chroot +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -set -e - -# Remove udev persistent rules. -# -# This removes udev persistent rules that cache the host systems mac address to -# remember its device name. - -for _FILE in /etc/udev/rules.d/*persistent-net.rules -do - if [ -e "${_FILE}" ] - then - : > ${_FILE} - fi -done diff --git a/share/hooks/0910-remove-apt-sources-lists.chroot b/share/hooks/0910-remove-apt-sources-lists.chroot new file mode 100755 index 000000000..1c8ca2d22 --- /dev/null +++ b/share/hooks/0910-remove-apt-sources-lists.chroot @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +# Remove apt sources.list files + +rm -f /etc/apt/sources.list +rm -f /etc/apt/sources.list.d/*.list -- cgit v1.2.3