1
0
mirror of https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git synced 2026-02-04 04:22:43 +03:00

Edit init

This commit is contained in:
Jake Buchholz Göktürk 2025-12-28 01:23:50 +00:00
parent 84f48cfbe6
commit 28a4e65460

View File

@ -18,6 +18,10 @@ init__set_ssh_keys() {
imds @ssh-keys | while IFS= read -r userkey; do imds @ssh-keys | while IFS= read -r userkey; do
user=$(echo "$userkey" | cut -d: -f1) user=$(echo "$userkey" | cut -d: -f1)
key=$(echo "$userkey" | cut -d: -f2-) key=$(echo "$userkey" | cut -d: -f2-)
if [ -z "$user" ]; then
log -i -t "$phase" warning "$ACTION: skipping login-less SSH key"
continue
fi
if ! pwent="$(getent passwd "$user")"; then if ! pwent="$(getent passwd "$user")"; then
log -i -t "$phase" warning "$ACTION: skipping SSH key for $user" log -i -t "$phase" warning "$ACTION: skipping SSH key for $user"
continue continue