From bbbe6a66dfbedf541903fea1eb327d0f2f10b313 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 28 Nov 2012 17:48:01 +0100 Subject: Using four letter digit prefixes for hooks like for consistency with all other live packages. --- share/hooks/001-update-apt-file-cache.chroot | 14 -------------- share/hooks/0010-update-apt-file-cache.chroot | 14 ++++++++++++++ share/hooks/002-update-apt-xapian-index.chroot | 14 -------------- share/hooks/0020-update-apt-xapian-index.chroot | 14 ++++++++++++++ share/hooks/003-update-mlocate-database.chroot | 14 -------------- share/hooks/0030-update-mlocate-database.chroot | 14 ++++++++++++++ share/hooks/004-remove-dbus-machine-id.chroot | 9 --------- share/hooks/0040-remove-dbus-machine-id.chroot | 9 +++++++++ share/hooks/005-remove-gnome-icon-cache.chroot | 9 --------- share/hooks/0050-remove-gnome-icon-cache.chroot | 9 +++++++++ share/hooks/006-remove-openssh-server-host-keys.chroot | 10 ---------- share/hooks/0060-remove-openssh-server-host-keys.chroot | 10 ++++++++++ share/hooks/007-remove-python-py.chroot | 9 --------- share/hooks/0070-remove-python-py.chroot | 9 +++++++++ share/hooks/008-remove-udev-persistent-rules.chroot | 16 ---------------- share/hooks/0080-remove-udev-persistent-rules.chroot | 16 ++++++++++++++++ share/hooks/009-remove-apt-sources-lists.chroot | 9 --------- share/hooks/0090-remove-apt-sources-lists.chroot | 9 +++++++++ share/hooks/010-remove-linux-image-backups.chroot | 8 -------- share/hooks/0100-remove-linux-image-backups.chroot | 8 ++++++++ 20 files changed, 112 insertions(+), 112 deletions(-) delete mode 100755 share/hooks/001-update-apt-file-cache.chroot create mode 100755 share/hooks/0010-update-apt-file-cache.chroot delete mode 100755 share/hooks/002-update-apt-xapian-index.chroot create mode 100755 share/hooks/0020-update-apt-xapian-index.chroot delete mode 100755 share/hooks/003-update-mlocate-database.chroot create mode 100755 share/hooks/0030-update-mlocate-database.chroot delete mode 100755 share/hooks/004-remove-dbus-machine-id.chroot create mode 100755 share/hooks/0040-remove-dbus-machine-id.chroot delete mode 100755 share/hooks/005-remove-gnome-icon-cache.chroot create mode 100755 share/hooks/0050-remove-gnome-icon-cache.chroot delete mode 100755 share/hooks/006-remove-openssh-server-host-keys.chroot create mode 100755 share/hooks/0060-remove-openssh-server-host-keys.chroot delete mode 100755 share/hooks/007-remove-python-py.chroot create mode 100755 share/hooks/0070-remove-python-py.chroot delete mode 100755 share/hooks/008-remove-udev-persistent-rules.chroot create mode 100755 share/hooks/0080-remove-udev-persistent-rules.chroot delete mode 100755 share/hooks/009-remove-apt-sources-lists.chroot create mode 100755 share/hooks/0090-remove-apt-sources-lists.chroot delete mode 100755 share/hooks/010-remove-linux-image-backups.chroot create mode 100755 share/hooks/0100-remove-linux-image-backups.chroot (limited to 'share/hooks') diff --git a/share/hooks/001-update-apt-file-cache.chroot b/share/hooks/001-update-apt-file-cache.chroot deleted file mode 100755 index 60a00b39c..000000000 --- a/share/hooks/001-update-apt-file-cache.chroot +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -set -e - -# Update the Apt File cache. -# -# This allows to use using apt-file out-of-the-box. - -. /root/config/binary - -if [ -x /usr/bin/apt-file ] && [ "${LB_APT_INDICES}" = "true" ] -then - apt-file update -fi diff --git a/share/hooks/0010-update-apt-file-cache.chroot b/share/hooks/0010-update-apt-file-cache.chroot new file mode 100755 index 000000000..60a00b39c --- /dev/null +++ b/share/hooks/0010-update-apt-file-cache.chroot @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +# Update the Apt File cache. +# +# This allows to use using apt-file out-of-the-box. + +. /root/config/binary + +if [ -x /usr/bin/apt-file ] && [ "${LB_APT_INDICES}" = "true" ] +then + apt-file update +fi diff --git a/share/hooks/002-update-apt-xapian-index.chroot b/share/hooks/002-update-apt-xapian-index.chroot deleted file mode 100755 index dcb39b261..000000000 --- a/share/hooks/002-update-apt-xapian-index.chroot +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -set -e - -# Update the Apt Xapian index. -# -# The package would do this itself, but (a) it checks policy-rc.d which says it -# is not allowed to, and (b) it wants to build the index in the background which -# will be racy in the context of live-build. - -if [ -x /usr/sbin/update-apt-xapian-index ] -then - PYTHONDONTWRITEBYTECODE=1 /usr/sbin/update-apt-xapian-index --force --quiet -fi diff --git a/share/hooks/0020-update-apt-xapian-index.chroot b/share/hooks/0020-update-apt-xapian-index.chroot new file mode 100755 index 000000000..dcb39b261 --- /dev/null +++ b/share/hooks/0020-update-apt-xapian-index.chroot @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +# Update the Apt Xapian index. +# +# The package would do this itself, but (a) it checks policy-rc.d which says it +# is not allowed to, and (b) it wants to build the index in the background which +# will be racy in the context of live-build. + +if [ -x /usr/sbin/update-apt-xapian-index ] +then + PYTHONDONTWRITEBYTECODE=1 /usr/sbin/update-apt-xapian-index --force --quiet +fi diff --git a/share/hooks/003-update-mlocate-database.chroot b/share/hooks/003-update-mlocate-database.chroot deleted file mode 100755 index 6bfdb3d4f..000000000 --- a/share/hooks/003-update-mlocate-database.chroot +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/sh - -set -e - -# Update the mlocate database. -# -# It is convenient for this to be already up to date on the live system, and it -# means that if the live system is later installed to a hard disk then less -# work will be required after installation. - -if [ -x /usr/bin/updatedb.mlocate ] -then - updatedb.mlocate -fi diff --git a/share/hooks/0030-update-mlocate-database.chroot b/share/hooks/0030-update-mlocate-database.chroot new file mode 100755 index 000000000..6bfdb3d4f --- /dev/null +++ b/share/hooks/0030-update-mlocate-database.chroot @@ -0,0 +1,14 @@ +#!/bin/sh + +set -e + +# Update the mlocate database. +# +# It is convenient for this to be already up to date on the live system, and it +# means that if the live system is later installed to a hard disk then less +# work will be required after installation. + +if [ -x /usr/bin/updatedb.mlocate ] +then + updatedb.mlocate +fi diff --git a/share/hooks/004-remove-dbus-machine-id.chroot b/share/hooks/004-remove-dbus-machine-id.chroot deleted file mode 100755 index 230099e46..000000000 --- a/share/hooks/004-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/0040-remove-dbus-machine-id.chroot b/share/hooks/0040-remove-dbus-machine-id.chroot new file mode 100755 index 000000000..230099e46 --- /dev/null +++ b/share/hooks/0040-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/005-remove-gnome-icon-cache.chroot b/share/hooks/005-remove-gnome-icon-cache.chroot deleted file mode 100755 index f562fd939..000000000 --- a/share/hooks/005-remove-gnome-icon-cache.chroot +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -set -e - -# Remove GNOME icon cache. -# -# This saves space some space (e.g. on Kubuntu). - -rm -f /usr/share/icons/*/icon-theme.cache diff --git a/share/hooks/0050-remove-gnome-icon-cache.chroot b/share/hooks/0050-remove-gnome-icon-cache.chroot new file mode 100755 index 000000000..f562fd939 --- /dev/null +++ b/share/hooks/0050-remove-gnome-icon-cache.chroot @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +# Remove GNOME icon cache. +# +# This saves space some space (e.g. on Kubuntu). + +rm -f /usr/share/icons/*/icon-theme.cache diff --git a/share/hooks/006-remove-openssh-server-host-keys.chroot b/share/hooks/006-remove-openssh-server-host-keys.chroot deleted file mode 100755 index 862704981..000000000 --- a/share/hooks/006-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/0060-remove-openssh-server-host-keys.chroot b/share/hooks/0060-remove-openssh-server-host-keys.chroot new file mode 100755 index 000000000..862704981 --- /dev/null +++ b/share/hooks/0060-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/007-remove-python-py.chroot b/share/hooks/007-remove-python-py.chroot deleted file mode 100755 index ff705838f..000000000 --- a/share/hooks/007-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/0070-remove-python-py.chroot b/share/hooks/0070-remove-python-py.chroot new file mode 100755 index 000000000..ff705838f --- /dev/null +++ b/share/hooks/0070-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/008-remove-udev-persistent-rules.chroot b/share/hooks/008-remove-udev-persistent-rules.chroot deleted file mode 100755 index 148ba30d1..000000000 --- a/share/hooks/008-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/0080-remove-udev-persistent-rules.chroot b/share/hooks/0080-remove-udev-persistent-rules.chroot new file mode 100755 index 000000000..148ba30d1 --- /dev/null +++ b/share/hooks/0080-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/009-remove-apt-sources-lists.chroot b/share/hooks/009-remove-apt-sources-lists.chroot deleted file mode 100755 index 074b551a1..000000000 --- a/share/hooks/009-remove-apt-sources-lists.chroot +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -set -e - -# Remove apt sources.list files - -rm -f /etc/apt/sources.list -rm -f /etc/apt/sources.list~ -rm -f /etc/apt/sources.list.d/*.list diff --git a/share/hooks/0090-remove-apt-sources-lists.chroot b/share/hooks/0090-remove-apt-sources-lists.chroot new file mode 100755 index 000000000..074b551a1 --- /dev/null +++ b/share/hooks/0090-remove-apt-sources-lists.chroot @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +# Remove apt sources.list files + +rm -f /etc/apt/sources.list +rm -f /etc/apt/sources.list~ +rm -f /etc/apt/sources.list.d/*.list diff --git a/share/hooks/010-remove-linux-image-backups.chroot b/share/hooks/010-remove-linux-image-backups.chroot deleted file mode 100755 index 1302d6c93..000000000 --- a/share/hooks/010-remove-linux-image-backups.chroot +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -set -e - -# Remove backup files - -rm -f /boot/*.bak -rm -f /boot/*.old-dkms diff --git a/share/hooks/0100-remove-linux-image-backups.chroot b/share/hooks/0100-remove-linux-image-backups.chroot new file mode 100755 index 000000000..1302d6c93 --- /dev/null +++ b/share/hooks/0100-remove-linux-image-backups.chroot @@ -0,0 +1,8 @@ +#!/bin/sh + +set -e + +# Remove backup files + +rm -f /boot/*.bak +rm -f /boot/*.old-dkms -- cgit v1.2.3