public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Khem Raj via Libc-alpha <libc-alpha@sourceware.org>
Cc: Khem Raj <raj.khem@gmail.com>,  Ross Burton <ross.burton@intel.com>
Subject: Re: [PATCH] Remove bash dependency for nscd init script
Date: Thu, 02 Dec 2021 16:40:09 +0100	[thread overview]
Message-ID: <87r1av2exy.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <20211202070658.2164977-1-raj.khem@gmail.com> (Khem Raj via Libc-alpha's message of "Wed, 1 Dec 2021 23:06:56 -0800")

* Khem Raj via Libc-alpha:

> The nscd init script uses #! /bin/bash but only really uses one bashism
> (translated strings), so remove them and switch the shell to #!/bin/sh.
>
> Signed-off-by: Ross Burton <ross.burton@intel.com>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  nscd/nscd.init | 14 +++++++-------
>  1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/nscd/nscd.init b/nscd/nscd.init
> index a882da7d8b..b02986ec15 100644
> --- a/nscd/nscd.init
> +++ b/nscd/nscd.init
> @@ -1,4 +1,4 @@
> -#!/bin/bash
> +#!/bin/sh
>  #
>  # nscd:		Starts the Name Switch Cache Daemon
>  #
> @@ -49,7 +49,7 @@ prog=nscd
>  start () {
>      [ -d /var/run/nscd ] || mkdir /var/run/nscd
>      [ -d /var/db/nscd ] || mkdir /var/db/nscd
> -    echo -n $"Starting $prog: "
> +    echo -n "Starting $prog: "

I believe “echo -n” is still a bashim.  The current-POSIX portable
solution is to use printf.  But “echo -n” might actually be *more*
portable than printf in practice.

Thanks,
Florian


  parent reply	other threads:[~2021-12-02 15:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02  7:06 Khem Raj
2021-12-02  7:06 ` [PATCH] sysdeps/gnu/configure.ac: Set libc_cv_rootsbindir only if its empty Khem Raj
2021-12-03  3:44   ` Mike Frysinger
2021-12-02  7:06 ` [PATCH] timezone: re-written tzselect as posix sh Khem Raj
2021-12-02 15:38   ` Florian Weimer
2021-12-02 16:15     ` Khem Raj
2021-12-02 18:55   ` Joseph Myers
2021-12-02 21:30   ` Paul Eggert
2021-12-02 15:40 ` Florian Weimer [this message]
2021-12-02 15:54   ` [PATCH] Remove bash dependency for nscd init script Khem Raj
2021-12-02 18:57     ` Florian Weimer
2021-12-02 17:40   ` Zack Weinberg

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=87r1av2exy.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=libc-alpha@sourceware.org \
    --cc=raj.khem@gmail.com \
    --cc=ross.burton@intel.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).