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

@@ -178,4 +178,31 @@ elif [[ "${1}" == '--tasksel' ]]; then
tasksel \
--new-install
elif [[ "${1}" == '--initramfs' ]]; then
printf \
"UMASK=0077\n" | \
tee /etc/initramfs-tools/conf.d/umask.conf &> /dev/null
update-initramfs \
-c \
-k all
elif [[ "${1}" == '--logrotate' ]]; then
for file in /etc/logrotate.d/* ; do
if grep -Eq "(^|[^#y])compress" "$file" ; then
sed -i -r "s/(^|[^#y])(compress)/\1#\2/" "$file"
fi
done
elif [[ "${1}" == '--systemctl-enable' ]]; then
systemctl \
enable \
zfs.target
systemctl \
enable \
zfs-import-cache
systemctl \
enable \
zfs-mount
systemctl \
enable \
zfs-import.target
fi