diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-03-19 06:46:26 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-03-19 06:46:26 +0000 |
commit | 607c465ede1a363b002fd9640af16639acf79e74 (patch) | |
tree | 7a387b8d6394ce28e0d3168817ca07214b6f78c1 /sys-apps | |
parent | Bump. (diff) | |
download | gentoo-2-607c465ede1a363b002fd9640af16639acf79e74.tar.gz gentoo-2-607c465ede1a363b002fd9640af16639acf79e74.tar.bz2 gentoo-2-607c465ede1a363b002fd9640af16639acf79e74.zip |
delay some initialization to make the optimal path even more optimal so we execute faster at boot
(Portage version: 2.2_pre2)
Diffstat (limited to 'sys-apps')
-rwxr-xr-x | sys-apps/module-init-tools/files/update-modules-3.4.sh | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/sys-apps/module-init-tools/files/update-modules-3.4.sh b/sys-apps/module-init-tools/files/update-modules-3.4.sh index f0804dc487f2..f8129a99fae6 100755 --- a/sys-apps/module-init-tools/files/update-modules-3.4.sh +++ b/sys-apps/module-init-tools/files/update-modules-3.4.sh @@ -52,7 +52,7 @@ while [ -n "$1" ] ; do -f|--force|force) FORCE="true";; -v|--verbose) ((VERBOSE+=1));; -d|--debug) ((DEBUG+=1));; - -V|--version) exec echo "${argv0}$Revision: 1.3 $ $Date: 2008/03/19 06:43:06 $";; + -V|--version) exec echo "${argv0}$Revision: 1.4 $ $Date: 2008/03/19 06:46:26 $";; -h|--help) cat <<-EOF Usage: update-modules [options] @@ -81,7 +81,6 @@ if [ ! -w ./etc ] ; then exit 2 fi -KV=${KV:-$(uname -r)} [ ${DEBUG} -gt 0 ] && set -x veinfo() { [ ${VERBOSE} -gt 0 ] && einfo "$*" ; return 0 ; } @@ -89,19 +88,6 @@ vewarn() { [ ${VERBOSE} -gt 0 ] && ewarn "$*" ; return 0 ; } [ "${ROOT}" != "/" ] && veinfo "Operating on ROOT = '${ROOT}'" -if type -P modprobe.old > /dev/null || \ - LC_ALL=C modprobe -V 2>/dev/null | grep -qs "modprobe version" -then - GENERATE_OLD="true" -else - GENERATE_OLD="false" -fi - - -# Reset the sorting order since we depend on it -export LC_COLLATE="C" - - # # Let's check the optimal case first: nothing to do # @@ -148,6 +134,24 @@ done # +# If the system doesnt have old modutils, then this is prob linux-2.6 only +# +if type -P modprobe.old > /dev/null || \ + LC_ALL=C modprobe -V 2>/dev/null | grep -qs "modprobe version" +then + GENERATE_OLD="true" +else + GENERATE_OLD="false" +fi + + +# Reset the sorting order since we depend on it +export LC_COLLATE="C" + +KV=${KV:-$(uname -r)} + + +# # Desc: backup a config file if need be and replace with new one # Usage: backup <old config file to backup> <new config file to replace with> # Ex: backup /etc/modules.conf /etc/modules.conf.tempfile |