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:
parent
84f48cfbe6
commit
28a4e65460
@ -18,6 +18,10 @@ init__set_ssh_keys() {
|
||||
imds @ssh-keys | while IFS= read -r userkey; do
|
||||
user=$(echo "$userkey" | cut -d: -f1)
|
||||
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
|
||||
log -i -t "$phase" warning "$ACTION: skipping SSH key for $user"
|
||||
continue
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user