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 231D41391DB for ; Sun, 16 Mar 2014 00:26:27 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AC446E0ADB; Sun, 16 Mar 2014 00:26:25 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 01545E0ADB for ; Sun, 16 Mar 2014 00:26:24 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1CAD433F980 for ; Sun, 16 Mar 2014 00:26:24 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id E792E18875 for ; Sun, 16 Mar 2014 00:26: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: <1394929392.4be2a63948607ae984314e5b214c7743247f4a40.ryao@gentoo> Subject: [gentoo-commits] proj/genkernel:master 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: 4be2a63948607ae984314e5b214c7743247f4a40 X-VCS-Branch: master Date: Sun, 16 Mar 2014 00:26: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: b0ad1016-855f-48a7-a988-0da5a8c3790d X-Archives-Hash: 24ead0367de83ecc5531543f30769ed0 commit: 4be2a63948607ae984314e5b214c7743247f4a40 Author: Richard Yao gentoo org> AuthorDate: Sat Mar 15 19:05:00 2014 +0000 Commit: Richard Yao gentoo org> CommitDate: Sun Mar 16 00:23:12 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=4be2a639 Record hostid into initramfs ZFS pool import on non-exported pools is only permitted when the hostid of the system matches the host id of the last pool to import it. Store the hostid of the system to ensure that it matches at boot. Signed-off-by: Richard Yao gentoo.org> --- gen_initramfs.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 40318a2..26bcdf6 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -99,6 +99,8 @@ append_base_layout() { date -u '+%Y%m%d-%H%M%S' > ${TEMP}/initramfs-base-temp/etc/build_date echo "Genkernel $GK_V" > ${TEMP}/initramfs-base-temp/etc/build_id + printf "$(hostid | sed 's/\([0-9A-F]\{2\}\)/\\x\1/gI')" > ${TEMP}/initramfs-base-temp/etc/hostid + cd "${TEMP}/initramfs-base-temp/" log_future_cpio_content find . -print | cpio ${CPIO_ARGS} --append -F "${CPIO}" \