Gentoo Archives: gentoo-commits

From: Richard Yao <ryao@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/genkernel:ryao commit in: /
Date: Mon, 03 Jun 2013 23:49:07
Message-Id: 1370303300.fa056924d69fceb3afc151e4294b5206d3a26c51.ryao@gentoo
1 commit: fa056924d69fceb3afc151e4294b5206d3a26c51
2 Author: Richard Yao <ryao <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jun 3 23:35:48 2013 +0000
4 Commit: Richard Yao <ryao <AT> gentoo <DOT> org>
5 CommitDate: Mon Jun 3 23:48:20 2013 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=fa056924
7
8 Silence cp error when optional ZFS files are unavailable
9
10 Users were seeing the following error message printed:
11
12 cp: cannot stat ‘/etc/zfs/zdev.conf’: No such file or directory
13
14 Both zdev.conf and zpool.cache are optional files. We print a warning
15 when they are absent, but cp printed its own error in addition to our
16 warning. We suppress that.
17
18 Signed-off-by: Richard Yao <ryao <AT> gentoo.org>
19
20 ---
21 gen_initramfs.sh | 2 +-
22 1 file changed, 1 insertion(+), 1 deletion(-)
23
24 diff --git a/gen_initramfs.sh b/gen_initramfs.sh
25 index 427ffad..745e15a 100755
26 --- a/gen_initramfs.sh
27 +++ b/gen_initramfs.sh
28 @@ -429,7 +429,7 @@ append_zfs(){
29 # Copy files to /etc/zfs
30 for i in /etc/zfs/{zdev.conf,zpool.cache}
31 do
32 - cp -a "${i}" "${TEMP}/initramfs-zfs-temp/etc/zfs" \
33 + cp -a "${i}" "${TEMP}/initramfs-zfs-temp/etc/zfs" 2> /dev/null \
34 || print_warning 1 "Could not copy file ${i} for ZFS"
35 done