diff options
author | Mike Frysinger <vapier@gentoo.org> | 2007-04-07 09:56:25 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2007-04-07 09:56:25 +0000 |
commit | 498cc46839310356652318cc0650c49ae92b6e45 (patch) | |
tree | 5d37f9e8b5a38b421251fd0dd7bb79019b553c46 /sys-apps/module-init-tools | |
parent | stable x86, security bug 168196 (diff) | |
download | gentoo-2-498cc46839310356652318cc0650c49ae92b6e45.tar.gz gentoo-2-498cc46839310356652318cc0650c49ae92b6e45.tar.bz2 gentoo-2-498cc46839310356652318cc0650c49ae92b6e45.zip |
Rename to update-modules and move/update the manpage from baselayout.
(Portage version: 2.1.2.3)
Diffstat (limited to 'sys-apps/module-init-tools')
-rw-r--r-- | sys-apps/module-init-tools/ChangeLog | 7 | ||||
-rwxr-xr-x | sys-apps/module-init-tools/files/update-modules (renamed from sys-apps/module-init-tools/files/modules-update) | 22 | ||||
-rw-r--r-- | sys-apps/module-init-tools/files/update-modules.8 | 74 | ||||
-rw-r--r-- | sys-apps/module-init-tools/module-init-tools-3.2.2-r2.ebuild | 14 |
4 files changed, 103 insertions, 14 deletions
diff --git a/sys-apps/module-init-tools/ChangeLog b/sys-apps/module-init-tools/ChangeLog index 3b53bf4dde85..b4b318fb87b4 100644 --- a/sys-apps/module-init-tools/ChangeLog +++ b/sys-apps/module-init-tools/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-apps/module-init-tools # Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/ChangeLog,v 1.125 2007/03/27 23:22:19 spb Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/ChangeLog,v 1.126 2007/04/07 09:56:25 vapier Exp $ + + 07 Apr 2007; Mike Frysinger <vapier@gentoo.org> -files/modules-update, + +files/update-modules, +files/update-modules.8, + module-init-tools-3.2.2-r2.ebuild: + Rename to update-modules and move/update the manpage from baselayout. 27 Mar 2007; Stephen Bennett <spb@gentoo.org> module-init-tools-3.2.2-r2.ebuild: diff --git a/sys-apps/module-init-tools/files/modules-update b/sys-apps/module-init-tools/files/update-modules index a65e996384f3..3ab0148ae5ce 100755 --- a/sys-apps/module-init-tools/files/modules-update +++ b/sys-apps/module-init-tools/files/update-modules @@ -1,7 +1,7 @@ #!/bin/bash # vim:ts=4 # -# modules-update script originally based on Debian's version. +# update-modules script originally based on Debian's version. # This script will update all the fun config files in /etc for # kernel modules. # @@ -29,6 +29,8 @@ if [[ ${EUID} != "0" ]] ; then exit 2 fi +[[ ${argv0} == "modules-update" ]] && ewarn "Please run 'update-modules' from now on; 'modules-update' is going away" + # # Setup some variables @@ -42,12 +44,12 @@ CFG_NEW_FILE="/etc/modprobe.conf" CFG_NEW_DIR="/etc/modprobe.d" CFG_NEW_DEVFS="/etc/modprobe.devfs" -HEADER="### This file is automatically generated by modules-update" +HEADER="### This file is automatically generated by update-modules" FULLHEADER="${HEADER} # # 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 modules-update(8). +# the manpage for update-modules(8). # " @@ -73,7 +75,7 @@ while [[ -n $1 ]] ; do -V|--version) exec cat /etc/gentoo-release;; -h|--help) cat <<-EOF - Usage: modules-update [options] + Usage: update-modules [options] Options: --assume-kernel=KV Assume the kernel is at least version KV @@ -147,7 +149,7 @@ for x in ${CFGFILES} ; do if ${FORCE} ; then ewarn "--force specified, (re)generating file anyway" else - eerror "Use \"modules-update force\" to force (re)generation" + eerror "Use \"update-modules force\" to force (re)generation" exit 1 fi fi @@ -193,7 +195,7 @@ generate_config() { # If config file is found in the reference dir, then skip it [[ -n ${refdir} ]] && [[ -e ${refdir}/${cfg##*/} ]] && continue - echo "### modules-update: start processing ${cfg}" >> "${tmpfile}" + echo "### update-modules: start processing ${cfg}" >> "${tmpfile}" if [[ -x ${cfg} ]] ; then # $cfg can be executable; nice touch, Wichert! :) @@ -203,7 +205,7 @@ generate_config() { fi echo >> "${tmpfile}" - echo "### modules-update: end processing ${cfg}" >> "${tmpfile}" + echo "### update-modules: end processing ${cfg}" >> "${tmpfile}" echo >> "${tmpfile}" done @@ -275,7 +277,7 @@ else # if we were called with it. if [[ -n ${ASSUME_KV} ]] && \ ! grep -qe --assume-kernel /sbin/generate-modprobe.conf ; then - eerror "Error: modules-update called with --assume-kernel flag, but" + eerror "Error: update-modules called with --assume-kernel flag, but" eerror "generate-modprobe.conf doesn't understand it. You need to" eerror "install >=module-init-tools-3.0-r2" exit 3 @@ -333,9 +335,9 @@ else [[ ${cfg} == *~ || ${cfg} == *.bak || ${cfg} == *,v ]] && continue echo >> "${CFG_NEW_FILE}" - echo "### modules-update: start processing ${cfg}" >> "${CFG_NEW_FILE}" + echo "### update-modules: start processing ${cfg}" >> "${CFG_NEW_FILE}" cat "${cfg}" >> "${CFG_NEW_FILE}" - echo "### modules-update: end processing ${cfg}" >> "${CFG_NEW_FILE}" + echo "### update-modules: end processing ${cfg}" >> "${CFG_NEW_FILE}" done fi diff --git a/sys-apps/module-init-tools/files/update-modules.8 b/sys-apps/module-init-tools/files/update-modules.8 new file mode 100644 index 000000000000..16e99e28c817 --- /dev/null +++ b/sys-apps/module-init-tools/files/update-modules.8 @@ -0,0 +1,74 @@ +.TH UPDATE-MODULES 8 "Gentoo Linux" "2007" +.SH NAME +update\-modules \- (re)generate module config files in /etc/ +.SH SYNOPSIS +\fBupdate\-modules\fR \fI[options]\fR +.SH DESCRIPTION +\fBupdate\-modules\fR is a simple tool to manage the module config files found +in the /etc/ directory. + +The old Linux module utilities use a single file for all their configuration. +This makes it difficult for packages to dynamically add information about their +own modules. + +\fBupdate-modules\fR makes the dynamic addition of information easier by +generating the single configuration file from the many files located in +\fI/etc/modules.d/\fR. All files in that directory are assembled together to +form \fI/etc/modules.conf\fR. + +Newer Linux module utilities include support automatically for a directory of +configuration files in \fI/etc/modprobe.d/\fR. However, to maintain backwards +compatibility with packages that do not yet support this, we still need to +assemble the contents of \fI/etc/modules.d/\fR and \fI/etc/modprobe.d/\fR and +produce the corresponding \fI/etc/modules.conf\fR and \fI/etc/modprobe.conf\fR. + +Also, when requested, it is also possible to generate \fI/etc/modules.devfs\fR. +.SH OPTIONS +.TP +\fI\-\-assume-kernel=<KV>\fR +When calculating which files need to be generated, assume the kernel version +is at least the specified \fIKV\fR. +.TP +\fI\-b\fR, \fI\-\-backup\fR +When updating configuration files, make backups by renaming files with a '.old' +suffix if they are going to be updated. +.TP +\fI\-d\fR, \fI\-\-debug\fR +Run with shell debugging enabled. Really only useful for tracking down +misbehavior. +.TP +\fI\-D\fR, \fI\-\-devfs\fR +Force generation of the deprecated \fI/etc/modules.devfs\fR file. +.TP +\fI\-f\fR, \fI\-\-force\fR +Force generation of files regardless of timestamps. By default, +\fBupdate-modules\fR will regenerate files only when timestamps indicate that +the configuration files are out of date. +.TP +\fI\-v\fR, \fI\-\-verbose\fR +Enable verbose output since by default, \fBupdate-modules\fR only displays +information when it does something and not when it skips steps. +.SH "FILES" +There are two types of file you can put in the module directories: normal files +and exectuable files. Normal files contain standard modules configuration +information, as described in \fBmodules.conf\fR(5) (for files in +\fI/etc/modules.d/\fR) or as described in \fBmodprobe.conf\fR(5) (for files in +\fI/etc/modprobe.d/\fR). Executable files are executed and their output is +used as extra configuration information. Error messages are sent to stderr and +thus do not become part of the configuration file. + +.nf +\fI/etc/modules.d/\fR - config snippets for old module utilities (<= linux-2.4) +\fI/etc/modules.conf\fR - sum of all files in \fI/etc/modules.d/\fR +\fI/etc/modprobe.d/\fR - config snippets for new module utilities (>= linux-2.6) +\fI/etc/modprobe.conf\fR - sum of all files in \fI/etc/modprobe.d/\fR +.fi +.SH "REPORTING BUGS" +Please report bugs via http://bugs.gentoo.org/ +.SH AUTHORS +This manual page was written by Wichert Akkerman <wakkerma@debian.org> +for the Debian GNU/Linux system. Modified for \fIGentoo Linux\fR. +.SH "SEE ALSO" +.BR depmod (1), +.BR modules.conf (5), +.BR modprobe.conf (5) diff --git a/sys-apps/module-init-tools/module-init-tools-3.2.2-r2.ebuild b/sys-apps/module-init-tools/module-init-tools-3.2.2-r2.ebuild index 738e6749ca60..918bc750635d 100644 --- a/sys-apps/module-init-tools/module-init-tools-3.2.2-r2.ebuild +++ b/sys-apps/module-init-tools/module-init-tools-3.2.2-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2007 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/module-init-tools-3.2.2-r2.ebuild,v 1.11 2007/03/27 23:22:19 spb Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/module-init-tools/module-init-tools-3.2.2-r2.ebuild,v 1.12 2007/04/07 09:56:25 vapier Exp $ inherit flag-o-matic eutils toolchain-funcs fixheadtails @@ -149,10 +149,18 @@ src_install() { # Install the modules.conf2modprobe.conf tool, so we can update # modprobe.conf. into / - dosbin "${S}"/generate-modprobe.conf "${FILESDIR}"/modules-update || die - dosym modules-update /sbin/update-modules + dosbin "${S}"/generate-modprobe.conf "${FILESDIR}"/update-modules || die + dosym update-modules /sbin/modules-update + doman "${FILESDIR}"/update-modules.8 doman *.[1-8] docinto / dodoc AUTHORS ChangeLog INSTALL NEWS README TODO } + +pkg_postinst() { + # cheat to keep users happy + if [[ -e ${ROOT}/etc/init.d/modules ]] ; then + sed -i 's:modules-update:update-modules:' /etc/init.d/modules + fi +} |