Moved automatic ZFS snapshot triggered by apt into seperate script. Moved 'logrotate' and 'initramfs' functions into 'debian.sh'

This commit is contained in:
2025-12-31 23:32:29 -05:00
parent 3e7a7a5788
commit 2b1a2f29ee
4 changed files with 60 additions and 57 deletions

View File

@@ -110,15 +110,7 @@ if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then
"${baseDir}/debian.sh" --dpkg-reconfigure
fi
# if [[ "${ID}" == 'debian' ]]; then
# printf \
# 'REMAKE_INITRD=yes\n' | \
# tee /etc/dkms/zfs.conf &> /dev/null
# fi
if [[ ! "${*}" = *--no-part* ]]; then
"${baseDir}/partition.sh" --efi
fi
"${baseDir}/partition.sh" --efi
if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then
"${baseDir}/debian.sh" --purge-os-prober
@@ -160,13 +152,7 @@ if [[ "${ID}" == 'debian' ]]; then
fi
if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then
printf \
"UMASK=0077\n" | \
tee /etc/initramfs-tools/conf.d/umask.conf &> /dev/null
update-initramfs \
-c \
-k all
"${baseDir}/debian.sh" --initramfs
elif [[ "${ID}" == 'fedora' ]]; then
dracut \
--force \
@@ -192,18 +178,7 @@ if [[ ! "${*}" = *--no-part* ]]; then
fi
if [[ "${ID}" == 'debian' ]] || [[ "${ID}" == 'elementary' ]]; then
systemctl \
enable \
zfs.target
systemctl \
enable \
zfs-import-cache
systemctl \
enable \
zfs-mount
systemctl \
enable \
zfs-import.target
"${baseDir}/debian.sh" --systemctl-enable
fi
zfs \