Compare commits

7 Commits

2 changed files with 15 additions and 7 deletions

View File

@@ -233,11 +233,11 @@ EOF
if [[ "${ID}" == 'fedora' ]]; then
printf \
'@reboot /usr/bin/home-fix.sh\n' | \
"@reboot\tsudo -u ${USERNAME} '${BASEDIR}/finalize.sh'\n@reboot\t/usr/bin/home-fix.sh\n" | \
tee /var/spool/cron/root &> /dev/null
elif [[ "${ID}" == 'debian' ]]; then
printf \
'@reboot /usr/bin/home-fix.sh\n' | \
"@reboot\tsudo -u ${USERNAME} '${BASEDIR}/finalize.sh'\n@reboot\t/usr/bin/home-fix.sh\n" | \
tee /var/spool/cron/crontabs/root &> /dev/null
chown \
@@ -250,6 +250,14 @@ EOF
fi
fi
if [[ ! -f '/usr/bin/shutdown' ]]; then
ln -s /sbin/shutdown /usr/bin/shutdown
fi
if [[ ! -f '/usr/bin/reboot' ]]; then
ln -s /sbin/reboot /usr/bin/reboot
fi
zfs \
snapshot \
${HOSTNAME,,}/ROOT/${ID}@post-install
@@ -261,7 +269,7 @@ cat << EOF
Script has finished running
Please reboot your computer
Please exit the chroot
Press any key to return to the main menu
EOF

View File

@@ -61,8 +61,9 @@ if [[ "${ID}" == 'debian' ]]; then
--yes \
mmdebstrap \
gdisk \
zfsutils-linux \
systemd-timesyncd
systemd-timesyncd \
whois \
zfsutils-linux
elif [[ "${ID}" == 'fedora' ]]; then
if [[ "${VERSION_ID}" -lt '41' ]]; then
dnf config-manager \
@@ -190,8 +191,7 @@ printf \
chroot \
/mnt \
bash \
--login
"$(printf "${BASEDIR}\n" | sed 's|.*\/|\/|')/install.sh"
mount | grep -v zfs | tac | awk '/\/mnt/ {print $3}' | xargs -I {} umount -Rlf {}