Gentoo Archives: gentoo-commits

From: Richard Yao <ryao@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/genkernel:ryao commit in: defaults/
Date: Mon, 03 Jun 2013 23:35:15
Message-Id: 1366874464.499f2d98b60588987b8e0a9e3a59a182c83d5785.ryao@gentoo
1 commit: 499f2d98b60588987b8e0a9e3a59a182c83d5785
2 Author: Fabio Erculiani <lxnay <AT> sabayon <DOT> org>
3 AuthorDate: Tue Apr 23 16:31:51 2013 +0000
4 Commit: Richard Yao <ryao <AT> gentoo <DOT> org>
5 CommitDate: Thu Apr 25 07:21:04 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=499f2d98
7
8 Improve speed of bootstrapCD by not calling devicelist unless needed
9
10 ---
11 defaults/initrd.scripts | 11 +++++++----
12 1 file changed, 7 insertions(+), 4 deletions(-)
13
14 diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
15 index a216b84..ff724b5 100755
16 --- a/defaults/initrd.scripts
17 +++ b/defaults/initrd.scripts
18 @@ -157,12 +157,15 @@ devicelist(){
19 }
20
21 bootstrapCD() {
22 - local DEVICES=`devicelist`
23 - # The device was specified on the command line, so there's no need to scan
24 - # a bunch of extra devices
25 + local DEVICES=
26 +
27 + # The device was specified on the command line, so there's no need
28 + # to scan a bunch of extra devices
29 [ -n "${CDROOT_DEV}" ] && DEVICES="${CDROOT_DEV}"
30 + [ -z "${CDROOT_DEV}" ] && DEVICES=$(devicelist)
31
32 - findmediamount "cdrom" "${SUBDIR}/${CDROOT_MARKER}" "REAL_ROOT" "${CDROOT_PATH}" ${DEVICES}
33 + findmediamount "cdrom" "${SUBDIR}/${CDROOT_MARKER}" \
34 + "REAL_ROOT" "${CDROOT_PATH}" ${DEVICES}
35 }
36
37 bootstrapKey() {