From f7564edd295a5d6f1603be812631ed4a401c1912 Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Wed, 11 May 2011 05:19:38 -0500 Subject: [PATCH] script/gentree: move /boot/zfs to /etc/zfs and symlink --- script/gentree | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/script/gentree b/script/gentree index 3796b7c..9b323db 100755 --- a/script/gentree +++ b/script/gentree @@ -203,6 +203,11 @@ do_prepboot() { log Prepare /boot chk mv "${sroot}/boot/boot" "${sroot}/boot/boot.blk" chk ln -sf . "${sroot}/boot/boot" + + # Move /boot/zfs to /etc/zfs and symlink + ls -1 "${sroot}/boot/zfs"/* 2>&- && chk mv "${sroot}/boot/zfs"/* "${sroot}/etc/zfs/" + chk rmdir "${sroot}/boot/zfs" + chk ln -svf ../etc/zfs "${sroot}/boot/zfs" } do_preptmp() { @@ -243,6 +248,9 @@ do_imgboot() { # Gzip kernel to save boot space chk onelink "${sboot}/kernel/kernel" chk gzip -9 "${sboot}/kernel/kernel" + + # Make sure /boot/zfs -> /etc/zfs symlink exists even without /boot mounted + [ -L "${sroot}/boot/zfs" ] || chk ln -sf ../etc/zfs "${sroot}/boot/zfs" } do_imgconf() { -- 2.42.0