8 |
# 02 Sep 2001 -- Removed "arch" stuff since I see no reason to have support for varying |
# 02 Sep 2001 -- Removed "arch" stuff since I see no reason to have support for varying |
9 |
# CPU architectures on a single system. |
# CPU architectures on a single system. |
10 |
|
|
11 |
# More Modifications by Niels Rogalla <niro@magellan-linux.net> for Megallan Linux |
# More modifications by Niels Rogalla <niro@magellan-linux.net> for Magellan-Linux |
12 |
# Hacked some entries to fit into Magellan: |
# Hacked some entries to fit into Magellan: |
13 |
# functions.sh & kernel-2.5 stuff not needed |
# functions.sh & kernel-2.5 stuff not needed |
14 |
|
|
26 |
ARCHDIR="${MODDIR}/arch" |
ARCHDIR="${MODDIR}/arch" |
27 |
HEADER="### This file is automatically generated by modules-update" |
HEADER="### This file is automatically generated by modules-update" |
28 |
|
|
|
#source /sbin/functions.sh |
|
29 |
source /etc/init.d/functions |
source /etc/init.d/functions |
30 |
|
|
31 |
KERNEL_2_5="no" |
KERNEL_2_5="no" |
32 |
|
|
33 |
#if [ "$(get_KV)" -ge "$(KV_to_int '2.5.48')" ] |
# needed for kernel 2.6 |
|
#then |
|
|
# KERNEL_2_5="yes" |
|
|
#fi |
|
|
|
|
|
#needed for kernel 2.6 |
|
34 |
if [ "$(kernel_major_version)" == "2.6" ] |
if [ "$(kernel_major_version)" == "2.6" ] |
35 |
then |
then |
36 |
KERNEL_2_5="yes" |
KERNEL_2_5="yes" |
66 |
if ! sed -ne 1p "${x}" | egrep -q "^${HEADER}" |
if ! sed -ne 1p "${x}" | egrep -q "^${HEADER}" |
67 |
then |
then |
68 |
echo "Error: the current ${x} is not automatically generated." |
echo "Error: the current ${x} is not automatically generated." |
69 |
|
|
70 |
if [ "$1" != "force" ] |
if [ "$1" != "force" ] |
71 |
then |
then |
72 |
echo "Use \"modules-update force\" to force (re)generation." |
echo "Use \"modules-update force\" to force (re)generation." |
128 |
[ ! -r "${cfg}" ] && continue |
[ ! -r "${cfg}" ] && continue |
129 |
|
|
130 |
[ -n "`echo "${cfg}" | awk '!/~$|\.bak$/ { print $0 }'`" ] || continue |
[ -n "`echo "${cfg}" | awk '!/~$|\.bak$/ { print $0 }'`" ] || continue |
131 |
|
|
132 |
echo "### modules-update: start processing ${cfg}" >> "${TMPFILE}" |
echo "### modules-update: start processing ${cfg}" >> "${TMPFILE}" |
133 |
|
|
134 |
if [ -x ${cfg} ] |
if [ -x ${cfg} ] |
135 |
then |
then |
136 |
# $cfg can be executable; nice touch, Wichert! :) |
# $cfg can be executable; nice touch, Wichert! :) |
138 |
else |
else |
139 |
cat "${cfg}" >> "${TMPFILE}" |
cat "${cfg}" >> "${TMPFILE}" |
140 |
fi |
fi |
141 |
|
|
142 |
echo >> "${TMPFILE}" |
echo >> "${TMPFILE}" |
143 |
echo "### modules-update: end processing ${cfg}" >> "${TMPFILE}" |
echo "### modules-update: end processing ${cfg}" >> "${TMPFILE}" |
144 |
echo >> "${TMPFILE}" |
echo >> "${TMPFILE}" |