From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 3BEF41381F3 for ; Mon, 3 Jun 2013 23:49:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id ADB05E0830; Mon, 3 Jun 2013 23:49:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 12FC7E086E for ; Mon, 3 Jun 2013 23:49:05 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 2D16833DFE8 for ; Mon, 3 Jun 2013 23:49:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id CCC8FE545D for ; Mon, 3 Jun 2013 23:49:03 +0000 (UTC) From: "Richard Yao" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Richard Yao" Message-ID: <1370303300.fa056924d69fceb3afc151e4294b5206d3a26c51.ryao@gentoo> Subject: [gentoo-commits] proj/genkernel:ryao commit in: / X-VCS-Repository: proj/genkernel X-VCS-Files: gen_initramfs.sh X-VCS-Directories: / X-VCS-Committer: ryao X-VCS-Committer-Name: Richard Yao X-VCS-Revision: fa056924d69fceb3afc151e4294b5206d3a26c51 X-VCS-Branch: ryao Date: Mon, 3 Jun 2013 23:49:03 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 4d6b932b-442e-4127-95a8-5a1b8ddf1671 X-Archives-Hash: 5d94aa920d982c895affe806c54b72e7 commit: fa056924d69fceb3afc151e4294b5206d3a26c51 Author: Richard Yao gentoo org> AuthorDate: Mon Jun 3 23:35:48 2013 +0000 Commit: Richard Yao gentoo org> CommitDate: Mon Jun 3 23:48:20 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=fa056924 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 gentoo.org> --- gen_initramfs.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 427ffad..745e15a 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