Skip to content

Commit

Permalink
Send ssh-keygen into background so it doesn't timeout waiting for ent…
Browse files Browse the repository at this point in the history
…ropy
  • Loading branch information
dkulp committed Apr 21, 2024
1 parent c2a8707 commit c485f23
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/boot/FPPINIT.cpp
Expand Up @@ -129,7 +129,12 @@ static void checkSSHKeys() {
}
}
printf(" - Regenerating SSH keys\n");
exec("/usr/bin/ssh-keygen -A");
if (FileExists("/dev/hwrng")) {
// if the hwrng exists, use it to see the urandom generator
// with some random data
exec("dd if=/dev/hwrng of=/dev/urandom count=1 bs=4096 status=none");
}
execbg("/usr/bin/ssh-keygen -A &");
}

// Copies files/config from the /boot partition to /home/fpp/media
Expand Down Expand Up @@ -164,7 +169,7 @@ static void checkHostName() {
getRawSetting("HostName", hn);
// By default on installation, hostname is fpp, but it does not appear in the settings file
if (hn == "") {
hn = "fpp";
hn = "fpp";
}
char hostname[256];
int result = gethostname(hostname, 256);
Expand Down

0 comments on commit c485f23

Please sign in to comment.