From 0eb6a7bdaedbdbcf66fb9d12c24b65b4854df415 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 17 Dec 2012 00:22:33 +0100 Subject: Renumbering hooks. --- functions/defaults.sh | 55 +++++++--------------- share/hooks/0010-disable-kexec-tools.chroot | 16 +++++++ share/hooks/0010-update-apt-file-cache.chroot | 14 ------ share/hooks/0020-update-apt-xapian-index.chroot | 14 ------ share/hooks/0030-update-mlocate-database.chroot | 14 ------ share/hooks/0040-remove-dbus-machine-id.chroot | 9 ---- share/hooks/0050-remove-gnome-icon-cache.chroot | 9 ---- .../0060-remove-openssh-server-host-keys.chroot | 10 ---- share/hooks/0070-remove-python-py.chroot | 9 ---- .../hooks/0080-remove-udev-persistent-rules.chroot | 16 ------- share/hooks/0090-remove-apt-sources-lists.chroot | 9 ---- .../hooks/0110-remove-adjtime-configuration.chroot | 11 +++++ share/hooks/0110-remove-mdadm-configuration.chroot | 7 --- .../hooks/0120-remove-adjtime-configuration.chroot | 11 ----- share/hooks/0120-remove-apt-sources-lists.chroot | 9 ++++ share/hooks/0130-disable-kexec-tools.chroot | 16 ------- share/hooks/0130-remove-backup-files.chroot | 17 +++++++ share/hooks/0140-remove-backup-files.chroot | 17 ------- share/hooks/0140-remove-dbus-machine-id.chroot | 9 ++++ share/hooks/0150-remove-gnome-icon-cache.chroot | 9 ++++ share/hooks/0150-remove-temporary-files.chroot | 14 ------ share/hooks/0170-remove-mdadm-configuration.chroot | 7 +++ share/hooks/0170-update-nvidia-alternative.chroot | 9 ---- .../0180-remove-openssh-server-host-keys.chroot | 10 ++++ share/hooks/0180-update-glx-alternative.chroot | 9 ---- share/hooks/0190-remove-python-py.chroot | 9 ++++ share/hooks/0200-remove-temporary-files.chroot | 14 ++++++ .../hooks/0210-remove-udev-persistent-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 ++++ 33 files changed, 204 insertions(+), 225 deletions(-) create mode 100755 share/hooks/0010-disable-kexec-tools.chroot delete mode 100755 share/hooks/0010-update-apt-file-cache.chroot delete mode 100755 share/hooks/0020-update-apt-xapian-index.chroot delete mode 100755 share/hooks/0030-update-mlocate-database.chroot delete mode 100755 share/hooks/0040-remove-dbus-machine-id.chroot delete mode 100755 share/hooks/0050-remove-gnome-icon-cache.chroot delete mode 100755 share/hooks/0060-remove-openssh-server-host-keys.chroot delete mode 100755 share/hooks/0070-remove-python-py.chroot delete mode 100755 share/hooks/0080-remove-udev-persistent-rules.chroot delete mode 100755 share/hooks/0090-remove-apt-sources-lists.chroot create mode 100755 share/hooks/0110-remove-adjtime-configuration.chroot delete mode 100755 share/hooks/0110-remove-mdadm-configuration.chroot delete mode 100755 share/hooks/0120-remove-adjtime-configuration.chroot create mode 100755 share/hooks/0120-remove-apt-sources-lists.chroot delete mode 100755 share/hooks/0130-disable-kexec-tools.chroot create mode 100755 share/hooks/0130-remove-backup-files.chroot delete mode 100755 share/hooks/0140-remove-backup-files.chroot create mode 100755 share/hooks/0140-remove-dbus-machine-id.chroot create mode 100755 share/hooks/0150-remove-gnome-icon-cache.chroot delete mode 100755 share/hooks/0150-remove-temporary-files.chroot create mode 100755 share/hooks/0170-remove-mdadm-configuration.chroot delete mode 100755 share/hooks/0170-update-nvidia-alternative.chroot create mode 100755 share/hooks/0180-remove-openssh-server-host-keys.chroot delete mode 100755 share/hooks/0180-update-glx-alternative.chroot create mode 100755 share/hooks/0190-remove-python-py.chroot create mode 100755 share/hooks/0200-remove-temporary-files.chroot create mode 100755 share/hooks/0210-remove-udev-persistent-rules.chroot create mode 100755 share/hooks/0300-update-apt-file-cache.chroot create mode 100755 share/hooks/0310-update-apt-xapian-index.chroot create mode 100755 share/hooks/0320-update-glx-alternative.chroot create mode 100755 share/hooks/0330-update-mlocate-database.chroot create mode 100755 share/hooks/0340-update-nvidia-alternative.chroot diff --git a/functions/defaults.sh b/functions/defaults.sh index f4863b6ee..120083359 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -600,44 +600,23 @@ Set_defaults () LB_UNION_FILESYSTEM="${LB_UNION_FILESYSTEM:-aufs}" # Setting distribution hooks - case "${LB_MODE}" in - *) - LB_CHROOT_HOOKS="${LB_CHROOT_HOOKS:-update-apt-file-cache \ - update-apt-xapian-index \ - update-mlocate-database \ - remove-dbus-machine-id \ - remove-openssh-server-host-keys \ - remove-python-py \ - remove-udev-persistent-rules \ - remove-mdadm-configuration \ - remote-adjtime-configuration \ - disable-kexec-tools \ - remove-backup-files \ - remove-temporary-files \ - remove-log-files \ - update-nvidia-alternative \ - update-glx-alternative}" - ;; - - kubuntu) - LB_CHROOT_HOOKS="${LB_CHROOT_HOOKS:-update-apt-file-cache \ - update-apt-xapian-index \ - update-mlocate-database \ - remove-dbus-machine-id \ - remove-gnome-icon-cache \ - remove-openssh-server-host-keys \ - remove-python-py \ - remove-udev-persistent-rules \ - remove-mdadm-configuration \ - remove-adjtime-configuration \ - disable-kexec-tools \ - remove-backup-files \ - remove-temporary-files \ - remove-log-files \ - update-nvidia-alternative \ - update-glx-alternative}" - ;; - esac + LB_CHROOT_HOOKS="${LB_CHROOT_HOOKS:-disable-kexec-tools \ + remove-adjtime-configuration \ + remove-apt-sources-lists \ + remove-backup-files \ + remove-dbus-machine-id \ + remove-gnome-icon-cache \ + remove-log-files \ + remove-mdadm-configuration \ + remove-openssh-server-host-keys \ + remove-python-py \ + remove-temporary-files \ + remove-udev-persistent-rules \ + update-apt-file-cache \ + update-apt-xapian-index \ + update-glx-alternative \ + update-mlocate-database \ + update-nvidia-alternative}" # Setting interactive shell/X11/Xnest LB_INTERACTIVE="${LB_INTERACTIVE:-false}" diff --git a/share/hooks/0010-disable-kexec-tools.chroot b/share/hooks/0010-disable-kexec-tools.chroot new file mode 100755 index 000000000..403d1d413 --- /dev/null +++ b/share/hooks/0010-disable-kexec-tools.chroot @@ -0,0 +1,16 @@ +#!/bin/sh + +set -e + +# Disable kexec-tools + +if [ -e /sbin/kexec ] +then + echo "kexec-tools kexec-tools/load_kexec boolean false" > /root/preseed + + debconf-set-selections /root/preseed + + rm -f /root/preseed + + dpkg-reconfigure kexec-tools +fi diff --git a/share/hooks/0010-update-apt-file-cache.chroot b/share/hooks/0010-update-apt-file-cache.chroot deleted file mode 100755 index 60a00b39c..000000000 --- a/share/hooks/0010-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/0020-update-apt-xapian-index.chroot b/share/hooks/0020-update-apt-xapian-index.chroot deleted file mode 100755 index dcb39b261..000000000 --- a/share/hooks/0020-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/0030-update-mlocate-database.chroot b/share/hooks/0030-update-mlocate-database.chroot deleted file mode 100755 index 6bfdb3d4f..000000000 --- a/share/hooks/0030-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/0040-remove-dbus-machine-id.chroot b/share/hooks/0040-remove-dbus-machine-id.chroot deleted file mode 100755 index 230099e46..000000000 --- a/share/hooks/0040-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/0050-remove-gnome-icon-cache.chroot b/share/hooks/0050-remove-gnome-icon-cache.chroot deleted file mode 100755 index f562fd939..000000000 --- a/share/hooks/0050-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/0060-remove-openssh-server-host-keys.chroot b/share/hooks/0060-remove-openssh-server-host-keys.chroot deleted file mode 100755 index 862704981..000000000 --- a/share/hooks/0060-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/0070-remove-python-py.chroot b/share/hooks/0070-remove-python-py.chroot deleted file mode 100755 index ff705838f..000000000 --- a/share/hooks/0070-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/0080-remove-udev-persistent-rules.chroot b/share/hooks/0080-remove-udev-persistent-rules.chroot deleted file mode 100755 index 148ba30d1..000000000 --- a/share/hooks/0080-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/0090-remove-apt-sources-lists.chroot b/share/hooks/0090-remove-apt-sources-lists.chroot deleted file mode 100755 index 074b551a1..000000000 --- a/share/hooks/0090-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/0110-remove-adjtime-configuration.chroot b/share/hooks/0110-remove-adjtime-configuration.chroot new file mode 100755 index 000000000..7fe5bbd15 --- /dev/null +++ b/share/hooks/0110-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-mdadm-configuration.chroot b/share/hooks/0110-remove-mdadm-configuration.chroot deleted file mode 100755 index 206b494da..000000000 --- a/share/hooks/0110-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/0120-remove-adjtime-configuration.chroot b/share/hooks/0120-remove-adjtime-configuration.chroot deleted file mode 100755 index 7fe5bbd15..000000000 --- a/share/hooks/0120-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/0120-remove-apt-sources-lists.chroot b/share/hooks/0120-remove-apt-sources-lists.chroot new file mode 100755 index 000000000..074b551a1 --- /dev/null +++ b/share/hooks/0120-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/0130-disable-kexec-tools.chroot b/share/hooks/0130-disable-kexec-tools.chroot deleted file mode 100755 index 403d1d413..000000000 --- a/share/hooks/0130-disable-kexec-tools.chroot +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/sh - -set -e - -# Disable kexec-tools - -if [ -e /sbin/kexec ] -then - echo "kexec-tools kexec-tools/load_kexec boolean false" > /root/preseed - - debconf-set-selections /root/preseed - - rm -f /root/preseed - - dpkg-reconfigure kexec-tools -fi diff --git a/share/hooks/0130-remove-backup-files.chroot b/share/hooks/0130-remove-backup-files.chroot new file mode 100755 index 000000000..6e0a69055 --- /dev/null +++ b/share/hooks/0130-remove-backup-files.chroot @@ -0,0 +1,17 @@ +#!/bin/sh + +set -e + +# Remove backup files +rm -f /boot/*.bak +rm -f /boot/*.old-dkms + +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/0140-remove-backup-files.chroot b/share/hooks/0140-remove-backup-files.chroot deleted file mode 100755 index 6e0a69055..000000000 --- a/share/hooks/0140-remove-backup-files.chroot +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -set -e - -# Remove backup files -rm -f /boot/*.bak -rm -f /boot/*.old-dkms - -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/0140-remove-dbus-machine-id.chroot b/share/hooks/0140-remove-dbus-machine-id.chroot new file mode 100755 index 000000000..230099e46 --- /dev/null +++ b/share/hooks/0140-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/0150-remove-gnome-icon-cache.chroot b/share/hooks/0150-remove-gnome-icon-cache.chroot new file mode 100755 index 000000000..f562fd939 --- /dev/null +++ b/share/hooks/0150-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/0150-remove-temporary-files.chroot b/share/hooks/0150-remove-temporary-files.chroot deleted file mode 100755 index fd220e030..000000000 --- a/share/hooks/0150-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/0170-remove-mdadm-configuration.chroot b/share/hooks/0170-remove-mdadm-configuration.chroot new file mode 100755 index 000000000..206b494da --- /dev/null +++ b/share/hooks/0170-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/0170-update-nvidia-alternative.chroot b/share/hooks/0170-update-nvidia-alternative.chroot deleted file mode 100755 index e73b9678b..000000000 --- a/share/hooks/0170-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/0180-remove-openssh-server-host-keys.chroot b/share/hooks/0180-remove-openssh-server-host-keys.chroot new file mode 100755 index 000000000..862704981 --- /dev/null +++ b/share/hooks/0180-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/0180-update-glx-alternative.chroot b/share/hooks/0180-update-glx-alternative.chroot deleted file mode 100755 index 8c36c43f9..000000000 --- a/share/hooks/0180-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/0190-remove-python-py.chroot b/share/hooks/0190-remove-python-py.chroot new file mode 100755 index 000000000..ff705838f --- /dev/null +++ b/share/hooks/0190-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/0200-remove-temporary-files.chroot b/share/hooks/0200-remove-temporary-files.chroot new file mode 100755 index 000000000..fd220e030 --- /dev/null +++ b/share/hooks/0200-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/0210-remove-udev-persistent-rules.chroot b/share/hooks/0210-remove-udev-persistent-rules.chroot new file mode 100755 index 000000000..148ba30d1 --- /dev/null +++ b/share/hooks/0210-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/0300-update-apt-file-cache.chroot b/share/hooks/0300-update-apt-file-cache.chroot new file mode 100755 index 000000000..60a00b39c --- /dev/null +++ b/share/hooks/0300-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/0310-update-apt-xapian-index.chroot b/share/hooks/0310-update-apt-xapian-index.chroot new file mode 100755 index 000000000..dcb39b261 --- /dev/null +++ b/share/hooks/0310-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/0320-update-glx-alternative.chroot b/share/hooks/0320-update-glx-alternative.chroot new file mode 100755 index 000000000..8c36c43f9 --- /dev/null +++ b/share/hooks/0320-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/0330-update-mlocate-database.chroot b/share/hooks/0330-update-mlocate-database.chroot new file mode 100755 index 000000000..6bfdb3d4f --- /dev/null +++ b/share/hooks/0330-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/0340-update-nvidia-alternative.chroot b/share/hooks/0340-update-nvidia-alternative.chroot new file mode 100755 index 000000000..e73b9678b --- /dev/null +++ b/share/hooks/0340-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