From 6379c5ff47ac5b1d64b9e9b47d94931bdfdc8162 Mon Sep 17 00:00:00 2001 From: "Andrew J. Hesford" Date: Sat, 11 Jul 2020 23:16:10 -0400 Subject: core-services/03-filesystems.sh: initialize ZFS even with no cachefile --- core-services/03-filesystems.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/core-services/03-filesystems.sh b/core-services/03-filesystems.sh index 9bb3db4..5430646 100644 --- a/core-services/03-filesystems.sh +++ b/core-services/03-filesystems.sh @@ -30,9 +30,14 @@ if [ -e /etc/crypttab ]; then fi fi -if [ -e /etc/zfs/zpool.cache -a -x /usr/bin/zfs ]; then - msg "Activating ZFS devices..." - zpool import -c /etc/zfs/zpool.cache -N -a +if [ -x /usr/bin/zpool -a -x /usr/bin/zfs ]; then + if [ -e /etc/zfs/zpool.cache ]; then + msg "Importing cached ZFS pools..." + zpool import -N -a -c /etc/zfs/zpool.cache + else + msg "Scanning for and importing ZFS pools..." + zpool import -N -a -o cachefile=none + fi msg "Mounting ZFS file systems..." zfs mount -a -- cgit 1.4.1