1
0
mirror of synced 2026-02-08 00:31:28 +00:00
Files
xen-tools.xen-tools/hooks/common/81-install-modules-init-tools
Axel Beckert cc2a6d4e41 Change all occurrences of $prefix in hooks and roles with $TARGET
"target" is also the name used in the debian installer for the
installation target while "prefix" is too ambiguous.
2013-04-18 21:01:19 +02:00

45 lines
885 B
Bash
Executable File

#!/bin/sh
#
# Ensure that either modules-init-tools or kmod is setup.
#
# This is required in most setups. But even if it isn't required it
# can't really do anything bad; just waste a bit of space.
#
TARGET=$1
#
# Source our common functions
#
if [ -e /usr/share/xen-tools/common.sh ]; then
. /usr/share/xen-tools/common.sh
else
. ./hooks/common.sh
fi
#
# Log our start
#
logMessage Script $0 starting
#
# Install either kmod or module-init-tools package.
#
if chroot ${TARGET} /usr/bin/apt-cache show module-init-tools >/dev/null 2>/dev/null; then
if chroot ${TARGET} /usr/bin/apt-cache show module-init-tools | fgrep -qi transitional; then
installDebianPackage ${TARGET} kmod
else
installDebianPackage ${TARGET} module-init-tools
fi
else
installDebianPackage ${TARGET} kmod
fi
#
# Log our finish
#
logMessage Script $0 finished