Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/4] scripts/mkusers: allow the creation of groups alone
Date: Tue, 21 Oct 2014 18:30:44 +0200	[thread overview]
Message-ID: <20141021163044.GB3912@free.fr> (raw)
In-Reply-To: <1413901599-27312-1-git-send-email-gustavo@zacarias.com.ar>

Gustavo, All,

On 2014-10-21 11:26 -0300, Gustavo Zacarias spake thusly:
> 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.

Gah, FIFO de-queuing. You beat me to it! :-)

> Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

> ---
>  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
> 
> _______________________________________________
> buildroot mailing list
> buildroot at busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

  parent reply	other threads:[~2014-10-21 16:30 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Yann E. MORIN [this message]
2014-10-22 20:14 ` [Buildroot] [PATCH 1/4] scripts/mkusers: allow the creation of groups alone Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141021163044.GB3912@free.fr \
    --to=yann.morin.1998@free.fr \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox