aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Yao <ryao@gentoo.org>2013-06-03 19:35:48 -0400
committerRichard Yao <ryao@cs.stonybrook.edu>2013-06-03 19:49:05 -0400
commit9e0f58b9b922f80f4dff6ca5dce7fb50e8bfd3ce (patch)
treed053148948d3894a7ea308f1593b342616f0e4fc
parentFix /etc/modprobe.d regression (diff)
downloadgenkernel-9e0f58b9b922f80f4dff6ca5dce7fb50e8bfd3ce.tar.gz
genkernel-9e0f58b9b922f80f4dff6ca5dce7fb50e8bfd3ce.tar.bz2
genkernel-9e0f58b9b922f80f4dff6ca5dce7fb50e8bfd3ce.zip
Silence cp error when optional ZFS files are unavailable
Users were seeing the following error message printed: cp: cannot stat ‘/etc/zfs/zdev.conf’: No such file or directory Both zdev.conf and zpool.cache are optional files. We print a warning when they are absent, but cp printed its own error in addition to our warning. We suppress that. Signed-off-by: Richard Yao <ryao@gentoo.org>
-rwxr-xr-xgen_initramfs.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/gen_initramfs.sh b/gen_initramfs.sh
index 427ffad6..745e15ad 100755
--- a/gen_initramfs.sh
+++ b/gen_initramfs.sh
@@ -429,7 +429,7 @@ append_zfs(){
# Copy files to /etc/zfs
for i in /etc/zfs/{zdev.conf,zpool.cache}
do
- cp -a "${i}" "${TEMP}/initramfs-zfs-temp/etc/zfs" \
+ cp -a "${i}" "${TEMP}/initramfs-zfs-temp/etc/zfs" 2> /dev/null \
|| print_warning 1 "Could not copy file ${i} for ZFS"
done