From b82c1349f229be4af8f68898b02167af98f2e47c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 6 May 2013 20:08:10 +0200 Subject: Renumbering hook scripts. --- share/hooks/0200-remove-udev-persistent-net-rules.chroot | 16 ---------------- share/hooks/0300-remove-udev-persistent-net-rules.chroot | 16 ++++++++++++++++ share/hooks/0300-update-apt-file-cache.chroot | 14 -------------- share/hooks/0310-update-apt-xapian-index.chroot | 14 -------------- share/hooks/0320-update-glx-alternative.chroot | 9 --------- share/hooks/0330-update-mlocate-database.chroot | 14 -------------- share/hooks/0340-update-nvidia-alternative.chroot | 9 --------- share/hooks/0400-update-apt-file-cache.chroot | 14 ++++++++++++++ share/hooks/0410-update-apt-xapian-index.chroot | 14 ++++++++++++++ share/hooks/0420-update-glx-alternative.chroot | 9 +++++++++ share/hooks/0430-update-mlocate-database.chroot | 14 ++++++++++++++ share/hooks/0440-update-nvidia-alternative.chroot | 9 +++++++++ 12 files changed, 76 insertions(+), 76 deletions(-) delete mode 100755 share/hooks/0200-remove-udev-persistent-net-rules.chroot create mode 100755 share/hooks/0300-remove-udev-persistent-net-rules.chroot delete mode 100755 share/hooks/0300-update-apt-file-cache.chroot delete mode 100755 share/hooks/0310-update-apt-xapian-index.chroot delete mode 100755 share/hooks/0320-update-glx-alternative.chroot delete mode 100755 share/hooks/0330-update-mlocate-database.chroot delete mode 100755 share/hooks/0340-update-nvidia-alternative.chroot create mode 100755 share/hooks/0400-update-apt-file-cache.chroot create mode 100755 share/hooks/0410-update-apt-xapian-index.chroot create mode 100755 share/hooks/0420-update-glx-alternative.chroot create mode 100755 share/hooks/0430-update-mlocate-database.chroot create mode 100755 share/hooks/0440-update-nvidia-alternative.chroot (limited to 'share') diff --git a/share/hooks/0200-remove-udev-persistent-net-rules.chroot b/share/hooks/0200-remove-udev-persistent-net-rules.chroot deleted file mode 100755 index 148ba30d1..000000000 --- a/share/hooks/0200-remove-udev-persistent-net-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/0300-remove-udev-persistent-net-rules.chroot b/share/hooks/0300-remove-udev-persistent-net-rules.chroot new file mode 100755 index 000000000..148ba30d1 --- /dev/null +++ b/share/hooks/0300-remove-udev-persistent-net-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/0300-update-apt-file-cache.chroot b/share/hooks/0300-update-apt-file-cache.chroot deleted file mode 100755 index 60a00b39c..000000000 --- a/share/hooks/0300-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/0310-update-apt-xapian-index.chroot b/share/hooks/0310-update-apt-xapian-index.chroot deleted file mode 100755 index dcb39b261..000000000 --- a/share/hooks/0310-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/0320-update-glx-alternative.chroot b/share/hooks/0320-update-glx-alternative.chroot deleted file mode 100755 index 8c36c43f9..000000000 --- a/share/hooks/0320-update-glx-alternative.chroot +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -set -e - -# Use mesa renderer by default -if [ -e /etc/alternatives/glx ] -then - update-alternatives --quiet --set glx /usr/lib/mesa-diverted -fi diff --git a/share/hooks/0330-update-mlocate-database.chroot b/share/hooks/0330-update-mlocate-database.chroot deleted file mode 100755 index 6bfdb3d4f..000000000 --- a/share/hooks/0330-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/0340-update-nvidia-alternative.chroot b/share/hooks/0340-update-nvidia-alternative.chroot deleted file mode 100755 index e73b9678b..000000000 --- a/share/hooks/0340-update-nvidia-alternative.chroot +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -set -e - -# Use newest nvidia version by default -if [ -e /etc/alternatives/nvidia ] && [ -e /usr/lib/nvidia/current ] -then - update-alternatives --quiet --set nvidia /usr/lib/nvidia/current -fi diff --git a/share/hooks/0400-update-apt-file-cache.chroot b/share/hooks/0400-update-apt-file-cache.chroot new file mode 100755 index 000000000..60a00b39c --- /dev/null +++ b/share/hooks/0400-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/0410-update-apt-xapian-index.chroot b/share/hooks/0410-update-apt-xapian-index.chroot new file mode 100755 index 000000000..dcb39b261 --- /dev/null +++ b/share/hooks/0410-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/0420-update-glx-alternative.chroot b/share/hooks/0420-update-glx-alternative.chroot new file mode 100755 index 000000000..8c36c43f9 --- /dev/null +++ b/share/hooks/0420-update-glx-alternative.chroot @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +# Use mesa renderer by default +if [ -e /etc/alternatives/glx ] +then + update-alternatives --quiet --set glx /usr/lib/mesa-diverted +fi diff --git a/share/hooks/0430-update-mlocate-database.chroot b/share/hooks/0430-update-mlocate-database.chroot new file mode 100755 index 000000000..6bfdb3d4f --- /dev/null +++ b/share/hooks/0430-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/0440-update-nvidia-alternative.chroot b/share/hooks/0440-update-nvidia-alternative.chroot new file mode 100755 index 000000000..e73b9678b --- /dev/null +++ b/share/hooks/0440-update-nvidia-alternative.chroot @@ -0,0 +1,9 @@ +#!/bin/sh + +set -e + +# Use newest nvidia version by default +if [ -e /etc/alternatives/nvidia ] && [ -e /usr/lib/nvidia/current ] +then + update-alternatives --quiet --set nvidia /usr/lib/nvidia/current +fi -- cgit v1.2.3