From 995031ed72ff79e213576be8ad363194ae006e00 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 17 Dec 2012 00:08:41 +0100 Subject: Using consistent naming for default hooks. --- functions/defaults.sh | 8 ++++---- share/hooks/0160-remove-log-files.chroot | 9 +++++++++ share/hooks/0160-truncate-log-files.chroot | 9 --------- share/hooks/0170-nvidia-default-version.chroot | 9 --------- share/hooks/0170-update-nvidia-alternative.chroot | 9 +++++++++ 5 files changed, 22 insertions(+), 22 deletions(-) create mode 100755 share/hooks/0160-remove-log-files.chroot delete mode 100755 share/hooks/0160-truncate-log-files.chroot delete mode 100755 share/hooks/0170-nvidia-default-version.chroot create mode 100755 share/hooks/0170-update-nvidia-alternative.chroot diff --git a/functions/defaults.sh b/functions/defaults.sh index 694a148ed..5ca0d8ae8 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -636,8 +636,8 @@ Set_defaults () disable-kexec-tools \ remove-backup-files \ remove-temporary-files \ - truncate-log-files \ - nvidia-default-version}" + remove-log-files \ + update-nvidia-alternative}" ;; kubuntu) @@ -655,8 +655,8 @@ Set_defaults () disable-kexec-tools \ remove-backup-files \ remove-temporary-files \ - truncate-log-files \ - nvidia-default-version}" + remove-log-files \ + update-nvidia-alternative}" ;; esac diff --git a/share/hooks/0160-remove-log-files.chroot b/share/hooks/0160-remove-log-files.chroot new file mode 100755 index 000000000..f95e54686 --- /dev/null +++ b/share/hooks/0160-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/0160-truncate-log-files.chroot b/share/hooks/0160-truncate-log-files.chroot deleted file mode 100755 index f95e54686..000000000 --- a/share/hooks/0160-truncate-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/0170-nvidia-default-version.chroot b/share/hooks/0170-nvidia-default-version.chroot deleted file mode 100755 index e73b9678b..000000000 --- a/share/hooks/0170-nvidia-default-version.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/0170-update-nvidia-alternative.chroot b/share/hooks/0170-update-nvidia-alternative.chroot new file mode 100755 index 000000000..e73b9678b --- /dev/null +++ b/share/hooks/0170-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