Commit 24a7e9f
committed
azure-init: Accept providing user groups via the CLI
Debian uses "sudo" as the group for having do-anything sudo permissions,
where-as Fedora uses "wheel". Otherwise the same binary works fine for
both. I don't see an advantage to baking the groups into the binary, so
this is a take on runtime configuration.
Accept a list of supplementary groups to use when provisioning the user
so the same binary can be used for both. Values can be provided using
the "-g" or "--groups" argument, or by setting the
"AZURE_INIT_USER_GROUPS" environment variable. If no groups are
provided, the default remains "wheel".
I found this helpful when testing Azure#105. We could expand this to allow
more runtime tweaks to, for example, the backend in use if folks like
this.1 parent 3ac3f41 commit 24a7e9f
2 files changed
+25
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
| |||
20 | 21 | | |
21 | 22 | | |
22 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
23 | 42 | | |
24 | 43 | | |
25 | 44 | | |
| |||
96 | 115 | | |
97 | 116 | | |
98 | 117 | | |
| 118 | + | |
| 119 | + | |
99 | 120 | | |
100 | 121 | | |
101 | 122 | | |
| |||
124 | 145 | | |
125 | 146 | | |
126 | 147 | | |
127 | | - | |
| 148 | + | |
| 149 | + | |
128 | 150 | | |
129 | 151 | | |
130 | 152 | | |
| |||
0 commit comments