#!/bin/bash # Prompt for password PASSWORD=$(zenity --entry \ --title="Unlock Encrypted ZFS Dataset" \ --text="Please enter the password to unlock and mount the encrypted ZFS dataset" \ --hide-text) # Check if password is not empty if [ -z "$PASSWORD" ] then zenity --error \ --title="Error" \ --text="No password entered. Aborting..." exit 1 fi # Unlock and mount the encrypted ZFS dataset zfs unlock -p "$PASSWORD" rpool/encrypted zfs mount rpool/encrypted