Fall back to meta-data/public-keys if meta-data/public-keys/0/openssh-key is not available.
This commit is contained in:
parent
eaa8b96541
commit
9ffe04f62f
1 changed files with 3 additions and 1 deletions
|
@ -77,7 +77,9 @@ cloudinit_fetch(struct system_config *sc)
|
||||||
|
|
||||||
/* pubkey */
|
/* pubkey */
|
||||||
if ((str = metadata(sc,
|
if ((str = metadata(sc,
|
||||||
"/latest/meta-data/public-keys/0/openssh-key", LINE)) == NULL)
|
"/latest/meta-data/public-keys/0/openssh-key", LINE)) == NULL &&
|
||||||
|
(str = metadata(sc,
|
||||||
|
"/latest/meta-data/public-keys", LINE)) == NULL)
|
||||||
goto fail;
|
goto fail;
|
||||||
if (agent_addpubkey(sc, str, NULL) != 0)
|
if (agent_addpubkey(sc, str, NULL) != 0)
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
Loading…
Reference in a new issue