mirror of
https://gitlab.alpinelinux.org/alpine/cloud/tiny-cloud.git
synced 2026-02-04 04:22:43 +03:00
Compare commits
5 Commits
10cdf9be39
...
98f1d35273
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
98f1d35273 | ||
|
|
7b6109c9b2 | ||
|
|
d36e8bca13 | ||
|
|
28a4e65460 | ||
|
|
84f48cfbe6 |
@ -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
|
||||||
|
|||||||
@ -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:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user