1
0
mirror of synced 2026-02-16 04:02:47 +00:00

2006-12-25 22:21:52 by steve

Updated to install a linux package if available.  See #404508
This commit is contained in:
steve
2006-12-25 22:21:53 +00:00
parent f16bb6a1d8
commit a4ae557e2a
3 changed files with 62 additions and 12 deletions

View File

@@ -33,11 +33,28 @@ logMessage Script $0 starting
#
# 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.
# The name of the package containing the correct modules.
#
mkdir -p ${prefix}/lib/modules
cp -au /lib/modules/*/ ${prefix}/lib/modules
linux_modules_package="linux-modules-$(uname -r)"
#
# Attempt to install that package. This will either work on an Etch
# system, or fail on a Sarge/custom kernel.
#
if chroot ${prefix} apt-cache policy ${linux_modules_package} 2>/dev/null; then
#
# If it worked then we can install the package.
#
installDebianPackage ${prefix} ${linux_modules_package}
else
#
# Fall back to copying over modules from the host to the new
# system.
mkdir -p ${prefix}/lib/modules
cp -au /lib/modules/$(uname -r) ${prefix}/lib/modules
fi
#
# Install the module-init-tools package.

View File

@@ -33,11 +33,27 @@ logMessage Script $0 starting
#
# 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.
# The name of the package containing the correct modules.
#
mkdir -p ${prefix}/lib/modules
cp -au /lib/modules/*/ ${prefix}/lib/modules
linux_modules_package="linux-modules-$(uname -r)"
#
# Attempt to install that package. This will either work on an Etch
# system, or fail on a Sarge/custom kernel.
#
if chroot ${prefix} apt-cache policy ${linux_modules_package} 2>/dev/null; then
#
# If it worked then we can install the package.
#
installDebianPackage ${prefix} ${linux_modules_package}
else
#
# Fall back to copying over modules from the host to the new
# system.
mkdir -p ${prefix}/lib/modules
cp -au /lib/modules/$(uname -r) ${prefix}/lib/modules
fi
#
# Install the module-init-tools package.

View File

@@ -33,11 +33,28 @@ logMessage Script $0 starting
#
# 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.
# The name of the package containing the correct modules.
#
mkdir -p ${prefix}/lib/modules
cp -au /lib/modules/*/ ${prefix}/lib/modules
linux_modules_package="linux-modules-$(uname -r)"
#
# Attempt to install that package. This will either work on an Etch
# system, or fail on a Sarge/custom kernel.
#
if chroot ${prefix} apt-cache policy ${linux_modules_package} 2>/dev/null; then
#
# If it worked then we can install the package.
#
installDebianPackage ${prefix} ${linux_modules_package}
else
#
# Fall back to copying over modules from the host to the new
# system.
mkdir -p ${prefix}/lib/modules
cp -au /lib/modules/$(uname -r) ${prefix}/lib/modules
fi
#
# Install the module-init-tools package.