summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2004-04-08 14:52:39 +0000
committerPascal Rigaux <pixel@mandriva.com>2004-04-08 14:52:39 +0000
commitd62275dc1b1807e34224ea1d33439438e4d28435 (patch)
tree1d64561123905eb1f9fd0538092ea375cfc4568f
parentf95f581243c87affb0235d00e1dc3b72ab10c0bb (diff)
downloaddrakx-backup-do-not-use-d62275dc1b1807e34224ea1d33439438e4d28435.tar
drakx-backup-do-not-use-d62275dc1b1807e34224ea1d33439438e4d28435.tar.gz
drakx-backup-do-not-use-d62275dc1b1807e34224ea1d33439438e4d28435.tar.bz2
drakx-backup-do-not-use-d62275dc1b1807e34224ea1d33439438e4d28435.tar.xz
drakx-backup-do-not-use-d62275dc1b1807e34224ea1d33439438e4d28435.zip
modinfo when running on kernel 2.6 is incompatible with the one on kernel 2.4, so handle both cases
-rwxr-xr-xkernel/update_kernel10
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/update_kernel b/kernel/update_kernel
index efa2361b0..772dd4a55 100755
--- a/kernel/update_kernel
+++ b/kernel/update_kernel
@@ -23,6 +23,10 @@ function create_marfile() {
$GIBASEDIR/mdk-stage1/mar/mar -c $marfile $*
}
+function build_kernel_is_26() {
+ uname -r | grep -q '^2\.6'
+}
+
function kern_version() {
if echo $1 | grep -q ^2.4; then
version=24
@@ -48,7 +52,11 @@ function create_modules() {
fi
perl -pi -e 's/((plip|ppa|imm): parport)/$1 parport_pc/' modules.dep
- /sbin/modinfo-$version -f '%{filename} %{description}\n' $objects | perl -lne 'print "$1\t$2" if /(.*?)\.k?o "(.*)"/' > modules.description
+ if build_kernel_is_26; then
+ /sbin/modinfo $objects | perl -lne 'print "$name\t$1" if $name && /^description:\s*(.*)/; $name = $1 if m!^filename:\s*(.*)\.k?o!' > modules.description
+ else
+ /sbin/modinfo-$version -f '%{filename} %{description}\n' $objects | perl -lne 'print "$1\t$2" if /(.*?)\.k?o "(.*)"/' > modules.description
+ fi
}
function create_modules_mar() {