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 561E51381F3 for ; Sun, 9 Jun 2013 09:57:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 557FCE07D7; Sun, 9 Jun 2013 09:57:46 +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 E8532E07D7 for ; Sun, 9 Jun 2013 09:57:45 +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 08F0633E24A for ; Sun, 9 Jun 2013 09:57:45 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id A448DE468F for ; Sun, 9 Jun 2013 09:57:43 +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: <1370771822.1fcb9b57fc6e2cf923c4486371de2c443a57290a.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: 1fcb9b57fc6e2cf923c4486371de2c443a57290a X-VCS-Branch: ryao Date: Sun, 9 Jun 2013 09:57:43 +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: 8470ab4f-e43b-4e06-8d78-ad01ac390e88 X-Archives-Hash: f9d37b21f955d7ea6c8d4a4de9f62d79 commit: 1fcb9b57fc6e2cf923c4486371de2c443a57290a Author: Richard Yao gentoo org> AuthorDate: Sun Jun 9 07:56:57 2013 +0000 Commit: Richard Yao gentoo org> CommitDate: Sun Jun 9 09:57:02 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=1fcb9b57 Eliminate warnings about missing ZFS files zpool.cache and zdev.conf are optional files, so instead of warning when they are missing, we print a message when they are copied. Signed-off-by: Richard Yao gentoo.org> --- gen_initramfs.sh | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 6ad51c1..ff7ae0e 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -424,13 +424,17 @@ append_zfs(){ rm -r "${TEMP}/initramfs-zfs-temp" fi - mkdir -p "${TEMP}/initramfs-zfs-temp/etc/zfs/" + mkdir -p "${TEMP}/initramfs-zfs-temp/etc/zfs" # Copy files to /etc/zfs - for i in /etc/zfs/{zdev.conf,zpool.cache} + for i in zdev.conf zpool.cache do - cp -a "${i}" "${TEMP}/initramfs-zfs-temp/etc/zfs" 2> /dev/null \ - || print_warning 1 "Could not copy file ${i} for ZFS" + if [ -f /etc/zfs/${i} ] + then + print_info 1 " >> Including ${i}" + cp -a "/etc/zfs/${i}" "${TEMP}/initramfs-zfs-temp/etc/zfs" 2> /dev/null \ + || gen_die "Could not copy file ${i} for ZFS" + fi done # Copy binaries