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 BCA97138200 for ; Sun, 9 Jun 2013 08:32:30 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 4DE1CE0899; Sun, 9 Jun 2013 08:32:30 +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 DC289E0899 for ; Sun, 9 Jun 2013 08:32:24 +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 F282333E31B for ; Sun, 9 Jun 2013 08:32:23 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id A5DD2E5464 for ; Sun, 9 Jun 2013 08:32:21 +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: <1370766656.d8e642c42a52f6ee72dec454d4db63c510a66ef6.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: d8e642c42a52f6ee72dec454d4db63c510a66ef6 X-VCS-Branch: ryao Date: Sun, 9 Jun 2013 08:32:21 +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: 1c64df44-3391-4fca-9a07-6eb71c9ea818 X-Archives-Hash: 38974c7aebc6f6adea41f23e5b92fe1b commit: d8e642c42a52f6ee72dec454d4db63c510a66ef6 Author: Richard Yao gentoo org> AuthorDate: Sun Jun 9 07:56:57 2013 +0000 Commit: Richard Yao gentoo org> CommitDate: Sun Jun 9 08:30:56 2013 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=d8e642c4 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..20bb1fd 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 " >> Copying system ${i} into initramfs..." + 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