#!/bin/zsh
# filesystem — umount everything except / before root-fs goes read-only## umountall -l unmounts all local-type filesystems that are NOT /.# ZFS pools export is handled implicitly by umount of their mountpoints.set -e
set -u
# Best-effort: anything that can't umount (busy) is logged but doesn't# block shutdown — ZFS in-kernel state will still checkpoint correctly./usr/sbin/umountall -l || true
# Explicitly sync ZFS before root goes ro/usr/sbin/zpool sync || true
exit 0