Gentoo Archives: gentoo-commits

From: "Robin H. Johnson" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/genkernel:master commit in: /
Date: Mon, 06 Feb 2012 08:19:49
Message-Id: a871576d170277d935306a78acebf24a52103b65.robbat2@gentoo
1 commit: a871576d170277d935306a78acebf24a52103b65
2 Author: Richard Yao <ryao <AT> cs <DOT> stonybrook <DOT> edu>
3 AuthorDate: Mon Feb 6 08:00:32 2012 +0000
4 Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
5 CommitDate: Mon Feb 6 08:19:17 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=a871576d
7
8 Fix hardcoded paths in multipath support
9
10 Signed-off-by: Robin H. Johnson <robbat2 <AT> gentoo.org>
11
12 ---
13 ChangeLog | 3 +++
14 gen_initramfs.sh | 28 ++--------------------------
15 2 files changed, 5 insertions(+), 26 deletions(-)
16
17 diff --git a/ChangeLog b/ChangeLog
18 index 5115896..0dec7c5 100644
19 --- a/ChangeLog
20 +++ b/ChangeLog
21 @@ -6,6 +6,9 @@
22 # $Id$
23
24 06 Feb 2012: Richard Yao <ryao@×××××××××××××.edu> gen_initramfs.sh:
25 + Refactor multipath initramfs generation using copy_binaries.
26 +
27 + 06 Feb 2012: Richard Yao <ryao@×××××××××××××.edu> gen_initramfs.sh:
28 copy_binaries utility function for putting binaries and librares into
29 initramfs (see git commit for full details).
30
31
32 diff --git a/gen_initramfs.sh b/gen_initramfs.sh
33 index b96e36e..02e6554 100755
34 --- a/gen_initramfs.sh
35 +++ b/gen_initramfs.sh
36 @@ -164,32 +164,8 @@ append_multipath(){
37 mkdir -p "${TEMP}/initramfs-multipath-temp/sbin/"
38 mkdir -p "${TEMP}/initramfs-multipath-temp/lib/"
39
40 - # Copy files to /lib
41 - for i in /lib/{ld-*,libc-*,libc.*,libdl-*,libdl.*,libdevmapper*so*,libpthread*,librt*,libreadline*,libncurses*}
42 - do
43 - cp -a "${i}" "${TEMP}/initramfs-multipath-temp/lib" \
44 - || gen_die "Could not copy file ${i} for MULTIPATH"
45 - done
46 -
47 - for i in /usr/lib/libaio*
48 - do
49 - cp -a "${i}" "${TEMP}/initramfs-multipath-temp/lib" \
50 - || gen_die "Could not copy file ${i} for MULTIPATH"
51 - done
52 -
53 - # Copy files to /sbin
54 - for i in /sbin/{multipath,kpartx,mpath_prio_*,devmap_name,dmsetup} /lib64/udev/scsi_id
55 - do
56 - cp -a "${i}" "${TEMP}/initramfs-multipath-temp/sbin" \
57 - || gen_die "Could not copy file ${i} for MULTIPATH"
58 - done
59 -
60 - # Copy files to /bin
61 - for i in /bin/mountpoint
62 - do
63 - cp -a "${i}" "${TEMP}/initramfs-multipath-temp/bin" \
64 - || gen_die "Could not copy file ${i} for MULTIPATH"
65 - done
66 + # Copy files
67 + copy_binaries "${TEMP}/initramfs-multipath-temp" "$(echo /sbin/{multipath,kpartx,mpath_prio_*,devmap_name,dmsetup} /lib64/udev/scsi_id /bin/mountpoint)"
68
69 if [ -x /sbin/multipath ]
70 then