Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 10809 Details for
Bug 19460
Dynamically generated make.conf file
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
update-make.conf--updates make.conf from make.conf.d
update-make.conf (text/plain), 2.23 KB, created by
Abhishek Amit (RETIRED)
on 2003-04-17 20:08:54 UTC
(
hide
)
Description:
update-make.conf--updates make.conf from make.conf.d
Filename:
MIME Type:
Creator:
Abhishek Amit (RETIRED)
Created:
2003-04-17 20:08:54 UTC
Size:
2.23 KB
patch
obsolete
>#!/bin/sh ># ># This is the update-make.conf.d script ># This is based on the update-modules script of debian, modifed by the people below: ># Written by Wichert Akkerman <wakkerma@debian.org> ># Copyright (C) 1998, 1999 Software in the Public Interest > ># Modifications by Daniel Robbins <drobbins@gentoo.org>, Gentoo Technologies, Inc. ># 02 Sep 2001 -- Removed "arch" stuff since I see no reason to have support for varying ># CPU architectures on a single system. > >CFGFILE="/etc/make.conf" >TMPFILE="${CFGFILE}.$!" >MODDIR="/etc/make.conf.d" >HEADER="### This file is automatically generated by update-make.conf" > >set -e > ># Reset the sorting order since we depend on it >export LC_COLLATE="C" > >depdir() { > dep="`egrep '[[:space:]]*depfile' ${CFGFILE} | tail -n 1 | sed -e 's/depfile=//' -e 's,/[^/]*$,,'`" > if [ -z "${dep}" ] > then > dep=/lib/modules/`uname -r` > fi > > echo ${dep} >} > >if [ -f ${CFGFILE} ] >then > if ! sed -ne 1p ${CFGFILE} | egrep -q "^${HEADER}" > then > echo "Error: the current ${CFGFILE} is not automatically generated." > > if [ "$1" != "force" ] > then > echo "Use \"update-modules force\" to force (re)generation." > exit 1 > else > echo "force specified, (re)generating file anyway." > fi > fi >fi > >if [ 0 -ne "`id -u`" ] >then > echo "You have to be root to do this." > exit 2 >fi > >if [ -e ${CFGFILE} ] >then > cp -f ${CFGFILE} ${CFGFILE}.old >fi > >echo ${HEADER} > ${TMPFILE} >cat <<EOF >> ${TMPFILE} ># ># Please do not edit this file directly. If you want to change or add ># anything please take a look at the files in $MODDIR and read ># the manpage for update-modules. ># >EOF > >for cfg in ${MODDIR}/* ${CONF} >do > [ -d ${cfg} ] && continue > > [ ! -r ${cfg} ] && continue > > [ -n "`echo ${cfg} | awk '!/~$|\.bak$/ { print $0 }'`" ] || continue > > echo "### update-modules: start processing ${cfg}" >> ${TMPFILE} > > if [ -x ${cfg} ] > then > # $cfg can be executable; nice touch, Wichert! :) > ${cfg} >> ${TMPFILE} > else > cat ${cfg} >> ${TMPFILE} > fi > > echo >> ${TMPFILE} > echo "### update-modules: end processing ${cfg}" >> ${TMPFILE} > echo >> ${TMPFILE} >done > >mv -f ${TMPFILE} ${CFGFILE} > ># We also call depmod here to stop insmod from complaining that modules.conf ># is more recent then modules.dep ># >if [ -d `depdir` -a -f /proc/modules ] >then > depmod -a >fi > > ># vim:ts=4
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 Raw
Actions:
View
Attachments on
bug 19460
: 10809 |
10812
|
10813