Setup-alpine/setup-user not working
Setup-user (USEROPTS) needs parameters containing spaces for groups and SSH keys.
USEROPTS="-a -g 'group1 group2'"
does not work, becuase setup-user gets called with... weird parameters:
[setup-user, -a, 'group1, group2']
I have verified this with strace. Note that one needs to use withspace both to separate arguments, and mark whitespace inside SSH public key or groups.
A solution I'm using right now looks like this:
IFS=';' setup-user ${USEROPTS:--a -g 'group1 group2 group3'}
Clarification: I have modified setup-alpine
to the line above.
Then USEROPTS could be -a;-g;group1 group2
.
Edited by radl97