Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/4] scripts/mkusers: allow the creation of groups alone
@ 2014-10-21 14:26 Gustavo Zacarias
  2014-10-21 14:26 ` [Buildroot] [PATCH 2/4] docs/manual: document makeusers group-only creation Gustavo Zacarias
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Gustavo Zacarias @ 2014-10-21 14:26 UTC (permalink / raw)
  To: buildroot

Let mkusers create groups alone, useful for supplementary permissions in
udev/systemd for example where users can be added to later at runtime.
Use a magic string "-" to signal that user creation should be skipped.

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 support/scripts/mkusers | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/support/scripts/mkusers b/support/scripts/mkusers
index ffd192d..5e5a5d9 100755
--- a/support/scripts/mkusers
+++ b/support/scripts/mkusers
@@ -397,6 +397,7 @@ main() {
     # Now, add users whose uid is *not* automatic
     while read username uid group gid passwd home shell groups comment; do
         [ -n "${username}" ] || continue    # Package with no user
+        [ "${username}" != "-" ] || continue # Magic string to skip user creation
         [ ${uid} -ge 0     ] || continue    # Automatic uid
         add_one_user "${username}" "${uid}" "${group}" "${gid}" "${passwd}" \
                      "${home}" "${shell}" "${groups}" "${comment}"
@@ -405,6 +406,7 @@ main() {
     # Finally, add users whose uid *is* automatic
     while read username uid group gid passwd home shell groups comment; do
         [ -n "${username}" ] || continue    # Package with no user
+        [ "${username}" != "-" ] || continue # Magic string to skip user creation
         [ ${uid} -eq -1    ] || continue    # Non-automatic uid
         add_one_user "${username}" "${uid}" "${group}" "${gid}" "${passwd}" \
                      "${home}" "${shell}" "${groups}" "${comment}"
-- 
2.0.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2014-10-22 20:14 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-21 14:26 [Buildroot] [PATCH 1/4] scripts/mkusers: allow the creation of groups alone Gustavo Zacarias
2014-10-21 14:26 ` [Buildroot] [PATCH 2/4] docs/manual: document makeusers group-only creation Gustavo Zacarias
2014-10-21 16:33   ` Yann E. MORIN
2014-10-21 14:26 ` [Buildroot] [PATCH 3/4] eudev: add input group Gustavo Zacarias
2014-10-21 16:33   ` Yann E. MORIN
2014-10-21 14:26 ` [Buildroot] [PATCH 4/4] systemd: " Gustavo Zacarias
2014-10-21 16:34   ` Yann E. MORIN
2014-10-21 16:30 ` [Buildroot] [PATCH 1/4] scripts/mkusers: allow the creation of groups alone Yann E. MORIN
2014-10-22 20:14 ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox