2006-12-25 22:21:52 by steve
Updated to install a linux package if available. See #404508
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user