diff options
| author | Mateusz Piotrowski <0mp@FreeBSD.org> | 2022-03-18 12:35:16 +0000 |
|---|---|---|
| committer | Mateusz Piotrowski <0mp@FreeBSD.org> | 2022-03-18 13:53:52 +0000 |
| commit | 97aeda2243568b386d792514996a06daec55eece (patch) | |
| tree | 57c42cafd45f14f8775b6f06edd2d7a78f72ff55 | |
| parent | 5c6935a645604b1e39b2cf6dbc23f66ec58f3e54 (diff) | |
| -rwxr-xr-x | libexec/rc/rc.d/zfs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/libexec/rc/rc.d/zfs b/libexec/rc/rc.d/zfs index 2d35f9b54642..dbc82f82c65b 100755 --- a/libexec/rc/rc.d/zfs +++ b/libexec/rc/rc.d/zfs @@ -13,6 +13,7 @@ name="zfs" desc="Mount and share ZFS datasets" rcvar="zfs_enable" start_cmd="zfs_start" +start_postcmd="zfs_poststart" stop_cmd="zfs_stop" required_modules="zfs" @@ -41,6 +42,17 @@ zfs_start() fi } +zfs_poststart() +{ + # Some of the keys to decrypt datasets are potentially stored on ZFS + # datasets that just got mounted. Let's try to load those keys and + # mount the datasets. + if checkyesno zfskeys_enable; then + /etc/rc.d/zfskeys start + zfs_start + fi +} + zfs_stop_jail() { if [ `$SYSCTL_N security.jail.mount_allowed` -eq 1 ]; then |
