1 |
commit: 9681b470ebb4dad1339b537950b154a54a21afe7 |
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:46:27 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=9681b470 |
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 |