6-add-ssh-to-bootloader #20

Merged
hygienic-books merged 28 commits from 6-add-ssh-to-bootloader into main 2023-11-05 01:35:45 +00:00
Showing only changes of commit 1690518197 - Show all commits

View File

@ -809,6 +809,17 @@ function ensure_ip_in_kcl () {
yq -i '.Kernel.CommandLine = "'"${new_kcl}"'"' "${zbm_config}"
}
function set_pub_keys () {
local authorized_keys_file raw_pub_keys
authorized_keys_file="${1:?}"
raw_pub_keys="${2:?}"
:> "${authorized_keys_file}"
while IFS= read -r pub_key_line; do
printf -- '%s\n' "${pub_key_line}" >> "${authorized_keys_file}"
done < <(<<<"${raw_pub_keys}" sed -r -e 's/,,/\n/g')
sed -i '/^$/d' "${authorized_keys_file}"
}
function we_want_ssh () {
#2.10
if [[ "${ARCHZBM_NET_CLIENT_IP}" ]] || \