From a09f66e4a711609c5baaf1107d320b532a36d20e Mon Sep 17 00:00:00 2001 From: "Jean (east-high-Nerd)" Date: Wed, 31 Dec 2025 23:40:06 -0500 Subject: [PATCH] Moved more ZFS things into 'zfs.sh' --- install.sh | 14 +++----------- post-inst.sh | 40 +--------------------------------------- zfs.sh | 34 ++++++++++++++++++++++++++++++++++ 3 files changed, 38 insertions(+), 50 deletions(-) diff --git a/install.sh b/install.sh index d272410..d1d2281 100755 --- a/install.sh +++ b/install.sh @@ -140,18 +140,10 @@ elif [[ "${ID}" == 'fedora' ]]; then "${baseDir}/fedora.sh" --dracut fi -zfs \ - set \ - org.zfsbootmenu:commandline='quiet splash rhgb noresume' \ - ${hostname,,}/ROOT/${ID} +"${baseDir}/zfs.sh" --splash -if [[ ! "${*}" = *--no-part* ]]; then - if [[ ! -z "$(zfs list | grep 'keystore')" ]]; then - zfs \ - set \ - org.zfsbootmenu:keysource=${hostname,,}/keystore \ - ${hostname,,} - fi +if [[ ! -z "$(zfs list | grep 'keystore')" ]]; then + "${baseDir}/zfs.sh" --keystore fi if [[ ! "${*}" = *--no-part* ]]; then diff --git a/post-inst.sh b/post-inst.sh index a4b8e45..1042dd0 100755 --- a/post-inst.sh +++ b/post-inst.sh @@ -33,45 +33,7 @@ cat << EOF EOF -source \ - /etc/os-release - -source \ - "${baseDir}/system.conf" - - -# if [[ ! "${*}" = *--no-part* ]]; then - zfs create\ - ${hostname,,}/home/${username} - - zfs create\ - ${hostname,,}/home/${username}/.config - - zfs create\ - -o canmount=off\ - ${hostname,,}/home/${username}/.var - - zfs create\ - ${hostname,,}/home/${username}/.var/app - - zfs create\ - -o canmount=off\ - ${hostname,,}/home/${username}/.local - - zfs create\ - -o canmount=off\ - ${hostname,,}/home/${username}/.local/share - - zfs create\ - ${hostname,,}/home/${username}/.local/share/flatpak - - printf \ - 'Adding user account...\n' - - adduser ${username} -# else -# adduser --no-create-home ${username} -# fi +"${baseDir}/zfs.sh" --home "${baseDir}/adduser.sh" diff --git a/zfs.sh b/zfs.sh index cc9f6b3..fe0cc28 100755 --- a/zfs.sh +++ b/zfs.sh @@ -235,4 +235,38 @@ elif [[ "${1}" == '--host-id' ]]; then zgenhostid \ -f \ 0x00bab10c +elif [[ "${1}" == '--home' ]]; then + zfs create\ + ${hostname,,}/home/${username} + + zfs create\ + ${hostname,,}/home/${username}/.config + + zfs create\ + -o canmount=off\ + ${hostname,,}/home/${username}/.var + + zfs create\ + ${hostname,,}/home/${username}/.var/app + + zfs create\ + -o canmount=off\ + ${hostname,,}/home/${username}/.local + + zfs create\ + -o canmount=off\ + ${hostname,,}/home/${username}/.local/share + + zfs create\ + ${hostname,,}/home/${username}/.local/share/flatpak +elif [[ "${1}" == '--keystore' ]]; then + zfs \ + set \ + org.zfsbootmenu:keysource=${hostname,,}/keystore \ + ${hostname,,} +elif [[ "${1}" == '--splash' ]]; then + zfs \ + set \ + org.zfsbootmenu:commandline='quiet splash rhgb noresume' \ + ${hostname,,}/ROOT/${ID} fi