Moved more ZFS things into 'zfs.sh'
This commit is contained in:
12
install.sh
12
install.sh
@@ -140,18 +140,10 @@ elif [[ "${ID}" == 'fedora' ]]; then
|
|||||||
"${baseDir}/fedora.sh" --dracut
|
"${baseDir}/fedora.sh" --dracut
|
||||||
fi
|
fi
|
||||||
|
|
||||||
zfs \
|
"${baseDir}/zfs.sh" --splash
|
||||||
set \
|
|
||||||
org.zfsbootmenu:commandline='quiet splash rhgb noresume' \
|
|
||||||
${hostname,,}/ROOT/${ID}
|
|
||||||
|
|
||||||
if [[ ! "${*}" = *--no-part* ]]; then
|
|
||||||
if [[ ! -z "$(zfs list | grep 'keystore')" ]]; then
|
if [[ ! -z "$(zfs list | grep 'keystore')" ]]; then
|
||||||
zfs \
|
"${baseDir}/zfs.sh" --keystore
|
||||||
set \
|
|
||||||
org.zfsbootmenu:keysource=${hostname,,}/keystore \
|
|
||||||
${hostname,,}
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! "${*}" = *--no-part* ]]; then
|
if [[ ! "${*}" = *--no-part* ]]; then
|
||||||
|
|||||||
40
post-inst.sh
40
post-inst.sh
@@ -33,45 +33,7 @@ cat << EOF
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
source \
|
"${baseDir}/zfs.sh" --home
|
||||||
/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}/adduser.sh"
|
"${baseDir}/adduser.sh"
|
||||||
|
|
||||||
|
|||||||
34
zfs.sh
34
zfs.sh
@@ -235,4 +235,38 @@ elif [[ "${1}" == '--host-id' ]]; then
|
|||||||
zgenhostid \
|
zgenhostid \
|
||||||
-f \
|
-f \
|
||||||
0x00bab10c
|
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
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user