commit:     3ff0e784021281b01e7a005e81fef4506d0192cb
Author:     Richard Yao <ryao <AT> gentoo <DOT> org>
AuthorDate: Mon Sep 21 01:22:36 2015 +0000
Commit:     Richard Yao <ryao <AT> gentoo <DOT> org>
CommitDate: Mon Sep 21 13:13:30 2015 +0000
URL:        https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=3ff0e784

Reimplement dozfs=force support

Signed-off-by: Richard Yao <ryao <AT> gentoo.org>

 defaults/initrd.scripts | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts
index d1c3873..b7c8cc3 100644
--- a/defaults/initrd.scripts
+++ b/defaults/initrd.scripts
@@ -1042,6 +1042,14 @@ startVolumes() {
                elif [ -f /etc/zfs/zpool.cache ]
                then
                        :
+               # Depreciated support for dozfs=force
+               elif [ -n "${ZPOOL_FORCE}" ]
+               then
+                       /sbin/zpool import -f -N "${ZFS_POOL}" 2>&1 >/dev/null
+                       if [ $? -ne 0 ]
+                       then
+                               bad_msg "Failed to force import ${ZFS_POOL}"
+                       fi
                elif /sbin/zpool import -f -N -o readonly=on "${ZFS_POOL}" 2>&1 
>/dev/null
                then
                        mkdir -p /tmp/zfs

Reply via email to