1
0
mirror of synced 2026-01-22 02:05:22 +00:00
xen-tools.xen-tools/etc/hook.d/80-install-modules
steve 7c26f68fd8 2006-05-23 12:26:13 by steve
Updated hooks to work with rpmstrap.
2006-05-23 12:26:13 +00:00

33 lines
839 B
Bash
Executable File

#!/bin/sh
#
# Install modules from the host system into the new image, and
# ensure that 'module-init-tools' is setup.
#
# This is most likely required if you're using a custom kernel
# for your Xen system. But even if it isn't required it can't
# really do anything bad; just waste a bit of space.
#
# Steve
# --
# http://www.steve.org.uk/
#
# The virtual image is mounted here.
#
prefix=$1
#
# Copy the modules from the host to the new system - we should only
# really copy the *correct* modules, but we don't know what they are.
#
mkdir -p ${prefix}/lib/modules
cp -R /lib/modules/*/ ${prefix}/lib/modules
#
# Now install the 'module-init-tools', unless running under rpmstrap.
#
if [ -z "${rpmstrap}" ]; then
DEBIAN_FRONTEND=noninteractive chroot ${prefix} /usr/bin/apt-get --yes --force-yes install module-init-tools
fi