1 |
commit: ab56be6468b2594ad092d76787d3c7b9a012ec0d |
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:43:04 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=ab56be64 |
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 were supposed to |
15 |
print a warning when they were absent, but cp printed its own error |
16 |
whenever they were missing. 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 |