From 38e3ce79f26bb2c08d754310b4cfe2744331cbff Mon Sep 17 00:00:00 2001 From: Jayne Passmore Date: Wed, 2 Apr 2025 18:38:05 -0500 Subject: [PATCH 1/5] fixed flag issue --- scripts/create.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/create.sh b/scripts/create.sh index fd0d802..c4f68b0 100644 --- a/scripts/create.sh +++ b/scripts/create.sh @@ -60,6 +60,7 @@ echo "" read -p "Is this correct (y/n)? " v;if [ "$v" != "y" ];then "Exiting, restart to reenter info"; exit;fi +dhcp_opts+=" -m $mac" if [ -n $subnet ]; then dhcp_opts=" -s $subnet";fi if [ -n $ip ]; then dhcp_opts+=" -i $ip";fi dhcp_opts+=" -m $mac" -- 2.49.0 From 852098465f810ba7235c07ecf35dc6400eb41bec Mon Sep 17 00:00:00 2001 From: Jayne Passmore Date: Wed, 2 Apr 2025 18:55:48 -0500 Subject: [PATCH 2/5] fixed ssh known hosts --- scripts/create.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/create.sh b/scripts/create.sh index c4f68b0..cd68e58 100644 --- a/scripts/create.sh +++ b/scripts/create.sh @@ -60,10 +60,9 @@ echo "" read -p "Is this correct (y/n)? " v;if [ "$v" != "y" ];then "Exiting, restart to reenter info"; exit;fi -dhcp_opts+=" -m $mac" -if [ -n $subnet ]; then dhcp_opts=" -s $subnet";fi +dhcp_opts=" -m $mac" +if [ -n $subnet ]; then dhcp_opts+=" -s $subnet";fi if [ -n $ip ]; then dhcp_opts+=" -i $ip";fi -dhcp_opts+=" -m $mac" lname=`echo $name | tr '[:upper:]' '[:lower:]'` @@ -155,7 +154,7 @@ echo "server up, waiting for ssh" sleep 30 ssh-keygen -R ${lname}.actcur.com -ssh-keyscan ${lname}.actcur.com | grep -v "#" | grep "ecdsa-sha2-nistp256" >> ~/.ssh/known_hosts +ssh-keyscan ${lname}.actcur.com | grep -v "#" | grep "ssh-ed25519 " >> ~/.ssh/known_hosts # install some dependencies case "$variant" in -- 2.49.0 From 70be84dc65a76c571f86b1a0a51b7a9d460ea0fa Mon Sep 17 00:00:00 2001 From: Jayne Passmore Date: Wed, 2 Apr 2025 18:57:41 -0500 Subject: [PATCH 3/5] fixed ssh known hosts again --- scripts/create.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/create.sh b/scripts/create.sh index cd68e58..822d23f 100644 --- a/scripts/create.sh +++ b/scripts/create.sh @@ -109,7 +109,7 @@ echo "#cloud-config sed -i "s/REPLACE_SIZE/${rs}/g" /tmp/user_configuration.json ssh-keygen -R ${lname}.actcur.com - ssh-keyscan ${lname}.actcur.com | grep -v "#" | grep "ecdsa-sha2-nistp256" >> ~/.ssh/known_hosts +ssh-keyscan ${lname}.actcur.com | grep -v "#" | grep "ssh-ed25519 " >> ~/.ssh/known_hosts scp -i $ssh_key_dir/id_arch_builder /tmp/user_configuration.json ${lname}.actcur.com:/tmp/user_configuration.json ssh -i $ssh_key_dir/id_arch_builder ${lname}.actcur.com "systemctl mask reflector.service; echo 'Server = https://pkg.actcur.com/repo/archlinux/\$repo/os/\$arch' > /etc/pacman.d/mirrorlist" -- 2.49.0 From 69a6b5cc8aa6ba950aceb79a45d45399e587eae4 Mon Sep 17 00:00:00 2001 From: Jayne Passmore Date: Wed, 2 Apr 2025 19:09:36 -0500 Subject: [PATCH 4/5] increase wait time for ssh up in archlinux --- scripts/create.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/scripts/create.sh b/scripts/create.sh index 822d23f..a6d0c1e 100644 --- a/scripts/create.sh +++ b/scripts/create.sh @@ -81,10 +81,10 @@ if [[ "$deflate" == "y" ]]; then deflate="--memballoon model=virtio,autodeflate= case "$variant" in "archlinux") - # create cloud-init - replace by grabbing these directly from git - mkdir -p /tmp/cloud-init + # create cloud-init - replace by grabbing these directly from git + mkdir -p /tmp/cloud-init -echo "#cloud-config + echo "#cloud-config - name: root ssh_authorized_keys: - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILG56T1k766Cru14kyXI8WXSJwlO2sVhmH6JeRWy+mfe root@host.actcur.com" > /tmp/cloud-init/user-data @@ -102,14 +102,14 @@ echo "#cloud-config done echo "server up, waiting for ssh" - sleep 30 + sleep 60 sed "s/REPLACE_HOSTNAME/${lname}.actcur.com/g" ../base_files/user_configuration.json > /tmp/user_configuration.json rs=$((root_disk*1024-206)) sed -i "s/REPLACE_SIZE/${rs}/g" /tmp/user_configuration.json ssh-keygen -R ${lname}.actcur.com -ssh-keyscan ${lname}.actcur.com | grep -v "#" | grep "ssh-ed25519 " >> ~/.ssh/known_hosts + ssh-keyscan ${lname}.actcur.com | grep -v "#" | grep "ssh-ed25519 " >> ~/.ssh/known_hosts scp -i $ssh_key_dir/id_arch_builder /tmp/user_configuration.json ${lname}.actcur.com:/tmp/user_configuration.json ssh -i $ssh_key_dir/id_arch_builder ${lname}.actcur.com "systemctl mask reflector.service; echo 'Server = https://pkg.actcur.com/repo/archlinux/\$repo/os/\$arch' > /etc/pacman.d/mirrorlist" -- 2.49.0 From dc3b9ac34ae61ddbb67e70aa47a22489ced4dbf0 Mon Sep 17 00:00:00 2001 From: Jayne Passmore Date: Wed, 2 Apr 2025 19:15:39 -0500 Subject: [PATCH 5/5] fixed arch key deployment --- scripts/create.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/create.sh b/scripts/create.sh index a6d0c1e..187fe9e 100644 --- a/scripts/create.sh +++ b/scripts/create.sh @@ -85,6 +85,7 @@ case "$variant" in mkdir -p /tmp/cloud-init echo "#cloud-config +users: - name: root ssh_authorized_keys: - ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAILG56T1k766Cru14kyXI8WXSJwlO2sVhmH6JeRWy+mfe root@host.actcur.com" > /tmp/cloud-init/user-data -- 2.49.0