From 2f9f31a7c0f4284e3201ecc84a48300725cdd0ff Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Mon, 3 Jun 2013 19:35:48 -0400 Subject: [PATCH] Silence cp error when optional ZFS files are unavailable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- gen_initramfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 349c2d5..1a9146d 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -341,7 +341,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