Changed unneeded 'elif' statements to simple individual 'if' statements

This commit is contained in:
2026-01-01 12:40:03 -05:00
parent 8d3c013539
commit 8b892d207d
4 changed files with 81 additions and 27 deletions

20
zfs.sh
View File

@@ -219,7 +219,9 @@ if [[ "${1}" == '--key' ]]; then
cp \
/etc/zfs/keys/${hostname,,}.key \
/mnt/etc/zfs/keys/
elif [[ "${1}" == '--unmount' ]]; then
fi
if [[ "${1}" == '--unmount' ]]; then
mount | grep -v zfs | tac | awk '/\/mnt/ {print $3}' | xargs -I {} umount -Rlf {}
if [[ "${ID}" == 'fedora' ]]; then
@@ -231,11 +233,15 @@ elif [[ "${1}" == '--unmount' ]]; then
zpool \
export \
-a
elif [[ "${1}" == '--host-id' ]]; then
fi
if [[ "${1}" == '--host-id' ]]; then
zgenhostid \
-f \
0x00bab10c
elif [[ "${1}" == '--home' ]]; then
fi
if [[ "${1}" == '--home' ]]; then
zfs create\
${hostname,,}/home/${username}
@@ -259,12 +265,16 @@ elif [[ "${1}" == '--home' ]]; then
zfs create\
${hostname,,}/home/${username}/.local/share/flatpak
elif [[ "${1}" == '--keystore' ]]; then
fi
if [[ "${1}" == '--keystore' ]]; then
zfs \
set \
org.zfsbootmenu:keysource=${hostname,,}/keystore \
${hostname,,}
elif [[ "${1}" == '--splash' ]]; then
fi
if [[ "${1}" == '--splash' ]]; then
zfs \
set \
org.zfsbootmenu:commandline='quiet splash rhgb noresume' \