Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 50880 Details for
Bug 66504
module-init-tools-3.0-r2 doesn't regenerate modprobe.conf with USE=no-old-linux
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
modules-update.patch
modules-update.patch (text/plain), 3.19 KB, created by
SpanKY
on 2005-02-09 18:06:40 UTC
(
hide
)
Description:
modules-update.patch
Filename:
MIME Type:
Creator:
SpanKY
Created:
2005-02-09 18:06:40 UTC
Size:
3.19 KB
patch
obsolete
>Index: modules-update >=================================================================== >RCS file: /var/cvsroot/gentoo-src/rc-scripts/sbin/modules-update,v >retrieving revision 1.12 >diff -u -r1.12 modules-update >--- modules-update 4 Feb 2005 06:29:39 -0000 1.12 >+++ modules-update 10 Feb 2005 02:06:22 -0000 >@@ -20,6 +20,7 @@ > TMPFILE="${CFGFILE}.$$" > CFGFILE2="/etc/modprobe.conf" > TMPFILE2="${CFGFILE2}.$$" >+TMPFILE2B="${CFGFILE2}B.$$" > CFGFILE3="/etc/modules.devfs" > TMPFILE3="${CFGFILE3}.$$" > CFGFILE4="/etc/modprobe.devfs" >@@ -54,6 +55,9 @@ > KERNEL_2_6=false > fi > >+# Check if $CONF is valid >+[[ ! -r ${CONF} ]] && CONF= >+ > set -e > > # Reset the sorting order since we depend on it >@@ -110,27 +114,41 @@ > fi > fi > >-for cfg in "${MODDIR}"/* "${CONF}" ; do >- [[ -d ${cfg} ]] && continue >- >- [[ ! -r ${cfg} ]] && continue >- >- # Skip backup and RCS files; fixes bug 20597 (07 May 2004 agriffis) >- [[ ${cfg} == *~ || ${cfg} == *.bak || ${cfg} == *,v ]] && continue >+generate_config() { >+ local cfg= >+ local conf="$1" >+ local moddir="$2" >+ local tmpfile="$3" >+ local do_mprobe="$4" >+ >+ for cfg in "${moddir}"/* "${conf}" ; do >+ [[ -d ${cfg} ]] && continue >+ >+ [[ ! -r ${cfg} ]] && continue >+ >+ # Skip backup and RCS files; fixes bug 20597 (07 May 2004 agriffis) >+ [[ ${cfg} == *~ || ${cfg} == *.bak || ${cfg} == *,v ]] && continue >+ >+ [[ ${do_mprobe} -eq 1 && -e "/etc/modprobe.d/${x##*/}" ]] && continue >+ >+ echo "### modules-update: start processing ${cfg}" >> "${tmpfile}" >+ >+ if [[ -x ${cfg} ]] ; then >+ # $cfg can be executable; nice touch, Wichert! :) >+ "${cfg}" >> "${tmpfile}" >+ else >+ cat "${cfg}" >> "${tmpfile}" >+ fi > >- echo "### modules-update: start processing ${cfg}" >> "${TMPFILE}" >+ echo >> "${tmpfile}" >+ echo "### modules-update: end processing ${cfg}" >> "${tmpfile}" >+ echo >> "${tmpfile}" >+ done > >- if [[ -x ${cfg} ]] ; then >- # $cfg can be executable; nice touch, Wichert! :) >- "${cfg}" >> "${TMPFILE}" >- else >- cat "${cfg}" >> "${TMPFILE}" >- fi >+ return 0 >+} > >- echo >> "${TMPFILE}" >- echo "### modules-update: end processing ${cfg}" >> "${TMPFILE}" >- echo >> "${TMPFILE}" >-done >+generate_config "${CONF}" "${MODDIR}" "${TMPFILE}" 0 > > mv -f "${TMPFILE}" "${CFGFILE}" > >@@ -150,8 +168,31 @@ > then > mv -f "${TMPFILE2}" "${CFGFILE2}" > else >- ewarn "Warning: could not generate ${CFGFILE2}!" >+ >+ # >+ # If we made it here, it means either generate-modprobe.conf >+ # bombed on us, or the user doesn't have modutils installed. >+ # If the latter is true, then we should generate modprobe.conf >+ # ourselves with any old files laying around in /etc/modules.d. >+ # > rm -f "${TMPFILE2}" >+ if type -p modprobe.old > /dev/null ; then >+ ewarn "Warning: could not generate ${CFGFILE2}!" >+ else >+ rm -f "${CFGFILE}" >+ echo "${FULLHEADER/modules.d/modprobe.d}" > "${TMPFILE2B}" >+ generate_config "${CONF}" "${MODDIR}" "${TMPFILE2}" 1 >+ export TESTING_MODPROBE_CONF="${TMPFILE2}" >+ if /sbin/generate-modprobe.conf ${ASSUME_KV:+--assume-kernel=${KV}} \ >+ >> "${TMPFILE2B}" 2> /dev/null >+ then >+ mv -f "${TMPFILE2B}" "${CFGFILE2}" >+ else >+ ewarn "Warning: could not generate ${CFGFILE2}!" >+ rm -f "${TMPFILE2B}" >+ fi >+ rm -f "${TMPFILE2}" >+ fi > fi > > if [[ -f ${CFGFILE3} ]] ; then
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 66504
:
49393
| 50880