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 C469E1381F3 for ; Sun, 9 Jun 2013 10:06:06 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6FD8AE07FA; Sun, 9 Jun 2013 10:06:02 +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 BED4AE0801 for ; Sun, 9 Jun 2013 10:06:01 +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 D601733E340 for ; Sun, 9 Jun 2013 10:06:00 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 8620AE530A for ; Sun, 9 Jun 2013 10:05:59 +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: <1370772318.569e6c8d0227908cd0535f79063df1c99b9c7088.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: 569e6c8d0227908cd0535f79063df1c99b9c7088 X-VCS-Branch: ryao Date: Sun, 9 Jun 2013 10:05:59 +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: 588559a7-4c89-4159-bea9-71709f366bc4 X-Archives-Hash: 1b68d22508d9fdb8bd5f5cdc07106a64 commit: 569e6c8d0227908cd0535f79063df1c99b9c7088 Author: Richard Yao gentoo org> AuthorDate: Sun Jun 9 07:56:57 2013 +0000 Commit: Richard Yao gentoo org> CommitDate: Sun Jun 9 10:05:18 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=569e6c8d 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 745e15a..9b354a4 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