|
The logic was broken due to lack of quotes around the semicolon
delimiters inside subshell commands. It did not work for single keys nor
multiple keys provided in SSH_KEYS.
This commit adds proper quotes, and also refactors the loop a bit to
reduce repeated commands, reduce indentation, and clarify variables.
Tested:
- Added INHERIT/SSH_KEYS to local.conf as described in script comments.
- Tested with 1 key: "root:/path/to/key.pub" and 2 keys
"root:/path/to/key.pub;root:/path/to/key2.pub".
- Verified that in all cases keys were added to authorized_keys files
exactly once by checking rootfs output:
(build/tmp/work/<machine>/<image>/<version>/rootfs/home/root/.ssh/authorized_keys)
Signed-off-by: Jonathan Doman <jonathan.doman@intel.com>
Change-Id: I58af4e8107daa6447b8276a66fc7c91e346c7dd5
|