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

Compare commits

..

5 Commits

Author SHA1 Message Date
Jake Buchholz Göktürk
98f1d35273 Edit init.test 2025-12-28 02:38:43 +00:00
Jake Buchholz Göktürk
7b6109c9b2 Edit init.test 2025-12-28 02:29:59 +00:00
Jake Buchholz Göktürk
d36e8bca13 Edit init 2025-12-28 02:28:20 +00:00
Jake Buchholz Göktürk
28a4e65460 Edit init 2025-12-28 01:23:50 +00:00
Jake Buchholz Göktürk
84f48cfbe6 Edit init 2025-12-28 01:18:59 +00:00
2 changed files with 6 additions and 1 deletions

View File

@ -17,6 +17,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

View File

@ -193,7 +193,8 @@ set_ssh_keys_body() {
set_ssh_keys_gcp_body() { set_ssh_keys_gcp_body() {
fake_bin getent <<-EOF fake_bin getent <<-EOF
#!/bin/sh #!/bin/sh
echo "alpine:x:1000:1000:Linux User,,,:/home/alpine:/bin/sh" echo "alpine:x:1000:1000:Linux User,,,:/home/alpine:/bin/sh" |
grep "^\$1:"
EOF EOF
fake_metadata_gcp <<-EOF fake_metadata_gcp <<-EOF
project: project: