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 2791F138200 for ; Mon, 3 Jun 2013 23:43:54 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 65BE7E087D; Mon, 3 Jun 2013 23:43:53 +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 D53F2E087D for ; Mon, 3 Jun 2013 23:43:52 +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 EF96733DC38 for ; Mon, 3 Jun 2013 23:43:51 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 9EFB6E545C for ; Mon, 3 Jun 2013 23:43:50 +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: <1370302984.ab56be6468b2594ad092d76787d3c7b9a012ec0d.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: ab56be6468b2594ad092d76787d3c7b9a012ec0d X-VCS-Branch: ryao Date: Mon, 3 Jun 2013 23:43:50 +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: 30bf36e1-95d0-4008-af46-24fb941b7ec0 X-Archives-Hash: 1d646caf96a98058719db4ba72900bdb commit: ab56be6468b2594ad092d76787d3c7b9a012ec0d Author: Richard Yao gentoo org> AuthorDate: Mon Jun 3 23:35:48 2013 +0000 Commit: Richard Yao gentoo org> CommitDate: Mon Jun 3 23:43:04 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=ab56be64 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 were supposed to print a warning when they were absent, but cp printed its own error whenever they were missing. 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