diff --git a/setup.sh b/setup.sh index da20b21..e6e2fe7 100644 --- a/setup.sh +++ b/setup.sh @@ -1409,6 +1409,7 @@ EOF } function configure_sshd () { + #3.4 local pub_key_line cat >> '/mnt/etc/ssh/sshd_config.d/40-defaults.conf' <<"EOF" @@ -1424,7 +1425,7 @@ EOF } function configure_dns () { - #3.4 + #3.5 rm '/mnt/etc/resolv.conf' ln -s '/run/systemd/resolve/stub-resolv.conf' '/mnt/etc/resolv.conf' @@ -1435,21 +1436,22 @@ function configure_dns () { } function configure_ntp () { + #3.6 systemctl enable 'systemd-timesyncd.service' --root='/mnt' } function configure_reflector () { - #3.5 + #3.7 systemctl enable 'reflector.service' 'reflector.timer' --root='/mnt' } function configure_zfs () { - #3.6 + #3.8 systemctl enable 'zfs-import-cache.service' 'zfs-mount.service' 'zfs-import.target' 'zfs.target' --root='/mnt' } function configure_zfs_mount_gen () { - #3.7 + #3.9 mkdir -p '/mnt/etc/zfs/zfs-list.cache' touch '/mnt/etc/zfs/zfs-list.cache/'"${zpool_name}" zfs list -H -o name,mountpoint,canmount,atime,relatime,devices,exec,readonly,setuid,nbmand | sed 's/\/mnt//' > '/mnt/etc/zfs/zfs-list.cache/'"${zpool_name}" @@ -1457,7 +1459,7 @@ function configure_zfs_mount_gen () { } function set_new_uefi_boot_entries () { - #3.8 + #3.10 declare -a uefi_images mapfile -t uefi_images < \ <(find '/mnt/efi/EFI/ZBM' -type f -iname '*.efi' -print0 | \ @@ -1500,7 +1502,7 @@ function set_new_uefi_boot_entries () { } function umount_all () { - #3.9 + #3.11 if [[ "${part_schema}" = 'mbr' ]]; then umount '/mnt/boot/syslinux' else @@ -1515,17 +1517,17 @@ function finalize_os_setup () { set_root_pw #3.2 configure_networking #3.3 if [[ "${ARCHZBM_OS_SSH_AUTH_KEYS}" ]]; then - configure_sshd + configure_sshd #3.4 fi - configure_dns #3.4 - configure_ntp - configure_reflector #3.5 - configure_zfs #3.6 - configure_zfs_mount_gen #3.7 + configure_dns #3.5 + configure_ntp #3.6 + configure_reflector #3.7 + configure_zfs #3.8 + configure_zfs_mount_gen #3.9 if [[ "${part_schema}" = 'gpt' ]]; then - set_new_uefi_boot_entries #3.8 + set_new_uefi_boot_entries #3.10 fi - umount_all #3.9 + umount_all #3.11 } function main () {