Commit ba37575
committed
init_userconf.sh: only add line to /etc/sudoers once
The script `init_userconf.sh` is installed into `/etc/cont-init.d/02_userconf` and will be run every time the container is started.
Currently, if the container is restarted multiple times, the line `%sudo ALL=(ALL) NOPASSWD:ALL` will be added each time the container is started.
This change checks if the line already exists and does not add it if it does.1 parent 6f25f32 commit ba37575
1 file changed
+3
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
173 | | - | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
174 | 176 | | |
175 | 177 | | |
176 | 178 | | |
| |||
0 commit comments