From 750cd5e9853820afecca4bf3741422b0e1c23e0b Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Mon, 17 Jun 2024 15:03:17 -0400 Subject: [PATCH] replace urandom with random These both use the same CSPRNG on modern kernels, but random waits for CSPRNG initialization instead of only attempting to initialize it. --- deploy-initial | 2 +- nginx-rotate-session-ticket-keys | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/deploy-initial b/deploy-initial index caacd2a..ab38982 100755 --- a/deploy-initial +++ b/deploy-initial @@ -50,7 +50,7 @@ rm ssh/sshd_config.tmp ssh $remote "arch-chroot /mnt systemctl enable chronyd.service fstrim.timer logrotate.timer plocate-updatedb.timer systemd-networkd.service sshd.service unbound.service" ssh $remote "arch-chroot /mnt systemctl disable remote-fs.target systemd-network-generator.service" -ssh $remote "dd if=/dev/urandom of=/mnt/swapfile bs=1M count=$swap status=progress" +ssh $remote "dd if=/dev/random of=/mnt/swapfile bs=1M count=$swap status=progress" password=$(head -c32 <(tr -dc A-Za-z0-9 new.key +head -c 80 new.key rsync -I new.key 4.key rm new.key nginx -s reload