From 0adb4a8774012478260d96dc1bd943bd3c22eb27 Mon Sep 17 00:00:00 2001 From: 0xAN Date: Tue, 21 Jan 2025 23:14:48 +0800 Subject: [PATCH] ZFS: add variables check step Very edge case, but just let it be --- how-to-guides/zfs.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/how-to-guides/zfs.md b/how-to-guides/zfs.md index 13495ca40c..efdfc7bc0c 100644 --- a/how-to-guides/zfs.md +++ b/how-to-guides/zfs.md @@ -44,6 +44,14 @@ Set variables: ZFS_POOL_NAME="celestia" && ZFS_DATASET_NAME="bridge" ``` +Validate variables are set: +```sh +if [ -z "$ZFS_POOL_NAME" ] || [ -z "$ZFS_DATASET_NAME" ]; then + echo "Error: Variables not set correctly" + exit 1 +fi +``` + Install ZFS utils: ```sh sudo apt update && sudo apt install zfsutils-linux