From f9f6632e3b77b66b5119d7ec79c8f674f48ca3d1 Mon Sep 17 00:00:00 2001 From: Reinhard Schmitz Date: Thu, 9 Nov 2023 12:51:21 +0100 Subject: [PATCH] Cleanup tpl.010.authkeys.sh and tpl.075.tmp-tmpfs.sh instead of remove --- etc/cobbler-distros.d/rhel-9.yaml | 2 ++ snippets/tpl.010.authkeys.sh | 7 ------- snippets/tpl.075.tmp-tmpfs.sh | 12 ------------ 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/etc/cobbler-distros.d/rhel-9.yaml b/etc/cobbler-distros.d/rhel-9.yaml index b5340c0..3d9550d 100644 --- a/etc/cobbler-distros.d/rhel-9.yaml +++ b/etc/cobbler-distros.d/rhel-9.yaml @@ -69,8 +69,10 @@ cobbler-distros: - '-teamd' snippets: - 'tpl.001.basics.sh' + - 'tpl.010.authkeys.sh' - 'tpl.041.network-el9.sh' - 'tpl.070.tweak_grub.sh' + - 'tpl.075.tmp-tmpfs.sh' - 'tpl.085.disable-ipv6.sh' - 'tpl.100.clear_repos.sh' - 'tpl.110.register-rhel.sh' diff --git a/snippets/tpl.010.authkeys.sh b/snippets/tpl.010.authkeys.sh index add340a..d35be5c 100644 --- a/snippets/tpl.010.authkeys.sh +++ b/snippets/tpl.010.authkeys.sh @@ -9,7 +9,6 @@ create_authkeys() { echo "${HASH_LINE}" echo "Calling create_authkeys() ..." echo - local url="${cobbler_url}/${ws_rel_filesdir}/${system_status}/keys/auth_keys_pp_betrieb" log "Creating /root/.ssh ..." mkdir -pv /root/.ssh @@ -19,12 +18,6 @@ create_authkeys() { echo "${HASH_LINE}" >> /root/.ssh/authorized_keys echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQDZ3QNzqiDE6jUzmXnOzIM93mZBPZtSDbCgYQd8xwOz9ZROxqLcckr8qIvyLFDv/fedwQlLDTg90LGX/zHHAB0T+0DB2dMFOWeSloIMMp+0WwG9i6H0ty6NUVSktvG6h4jbgkhMhHGUEHhxgR2LgxTjq8fpcMOLJ4HLLGW9W3BQOVtoi8hiffKm5DB9Au0HgNvXP/UrCQkBtFzMyhRb7D7aFyDyU/7SuM6m17DIYNx1cg79AH3mjRTQXaOVBrOBJ4uaqy6srbGzWs5FSIMMbgOrcmZRw5GilrG5dBbT/OQSN+sHlECx216pyLrbSWcwG1Fo11iI53pnColRUljMIPJ+XRffxT2yINEfyvfr0GGMKi4c5fcDumgYwT2+foefy72sBhNwKhzjuGySPgRU/1PH8oIcu4TJWyW1xi0AfVZnJhjU5RKeWQ9VMhh1nDntpRdD5z+0FrAL+9AINW4Bjboc6OisikIABBeoT9mbYNNGdHA7rpdJwURycJDpJDhyr0voNnmQ15JF6KZebM0+OW9apTxdotKPKYJ8pFBRGXrTENSVvFNIBbYD55IJ2MlOD2eX6XX2/tnHMdZHCE9Gi22Y8p1oiahLtCU3Th8WwazQlh4H9xAJzK0jp7MOpI3Y553i8zBU47VpO5juELH2bCNwChpdbZbY0i6MxQF61d2iJw== create-vmware-tpl@pixelpark.com" >> /root/.ssh/authorized_keys - local tmp_file=$( mktemp ) - curl -s -S -o "${tmp_file}" --connect-timeout 3 "${url}" || true - if [[ -s "${tmp_file}" ]] ; then - cat "${tmp_file}" >> /root/.ssh/authorized_keys - fi - rm -v "${tmp_file}" echo -e "\e[0Ksection_end:$( date +%s ):ks_create_authkeys\r\e[0K" } diff --git a/snippets/tpl.075.tmp-tmpfs.sh b/snippets/tpl.075.tmp-tmpfs.sh index e0a44f5..e16c8fa 100644 --- a/snippets/tpl.075.tmp-tmpfs.sh +++ b/snippets/tpl.075.tmp-tmpfs.sh @@ -10,19 +10,7 @@ setup_tmp_tmpfs() { echo log "Setting up /tmp as a tmpfs by a systemd mount unit ..." echo - mkdir --parents --verbose /etc/systemd/system/tmp.mount.d - cat > /etc/systemd/system/tmp.mount.d/mount_options.conf <<-EOF - [Mount] - Options=mode=1777,strictatime,nosuid,nodev,size=10%%,nr_inodes=1m - EOF - echo - echo "Generated /etc/systemd/system/tmp.mount.d/mount_options.conf:" - echo "---------- snip -----------" - cat /etc/systemd/system/tmp.mount.d/mount_options.conf - echo "---------- snip -----------" - - echo echo "Enabling unit tmp.mount ..." systemctl enable tmp.mount -- 2.39.5