unofficial mirror of 
 help / color / mirror / Atom feed
From: zimoun <>
To: Tobias Geerinckx-Rice <>
Cc: "Ludovic Courtès" <>,
Subject: [bug#43769] [PATCH v2 2/2] Check the service 'nscd' and suggest it.
Date: Tue, 13 Oct 2020 18:45:16 +0200
Message-ID: <> (raw)
In-Reply-To: <878sckambe.fsf@nckx> (Tobias Geerinckx-Rice's message of "Mon, 05 Oct 2020 14:28:53 +0200")

>> In practice, you enable nscd by running ‘apt install nscd’ or similar,
>> and I think we cannot guess what the right command is.  WDYT?
> I agree: I was under the assumption that nscd is commonly installed as part of
> the base OS, but disabled by default at the init system level.  If that's not
> likely to be true, don't let's bother.

>> ask and then try to start the service depending on the init system if nscd
>> is not running
> If the distro equivalent of ‘service start nscd’ works in the *common* case, I
> like it.  Otherwise a warning/suggestion to manually install & enable it is
> fine.
> My general point was that should do as much as it can with the
> information it already has ($INIT_SYS) and be consistent in using it, not that
> we start sniffing $LEGACY_PKG_MANAGER too :-)

As said, I have tried somehting like this uglyness… but it’s wrong!  It
is overcomplicated and if the package is installed, then it is highly
probable that is running.  I mean 2 kind of users:

 - the noob as me: “Please install nscd” and the I do “aptitude install
   nscd” and my distro takes care of everything (start it etc.)
 - the control-freak: they knows what to do with the message “Please
   install nscd”.

And we can try to guess the distro… but again it is overcomplicated.

So it’s not useful.  A message is enough.  Please give a look at v3.


--8<---------------cut here---------------start------------->8---
{ # Check if nscd is up and suggest to start it or install it
    if [ "$(type -P pidof)" ]; then
        if [ ! "$(pidof nscd)" ]; then
            _msg "${INF}We recommend installing and/or starting your distribution 'nscd' service"
            while true; do
                read -p "Permit to try starting your 'nscd' service? (yes/no) " yn
                case $yn in
                    [Yy]*) case "$INIT_SYS" in
                                   { initctl reload-configuration;
                                     /etc/init/ &&
                                         start nscd; } &&
                                       _msg "${PAS}enabled 'nscd' service via upstart"
                                   if [ ( systemctl daemon-reload &&
                                              systemctl enable nscd &&
                                              systemctl start nscd; ) ]; then
                                       _msg "${PAS}enabled 'nscd' service via systemd";

                                   { update-rc.d nscd defaults &&
                                         update-rc.d nscd enable &&
                                         service nscd start; } &&
                                       _msg "${PAS}enabled 'nscd' service via sysv"
                                   { rc-update add nscd default &&
                                        rc-service nscd start; } &&
                                       _msg "${PAS}enabled 'nscd' service via OpenRC"
                                   _msg "${ERR}unsupported init system; run the 'ncsd' service manually"
                    [Nn]*) _msg "${INF}Skipped 'nscd' service"
                    *) _msg "Please answer yes or no.";
        _msg "${WAR}We cannot determine1 if your distribution 'nscd' service is running"
    if [[ $flag == failure ]]; then
        _msg "${WAR}Please read 'info guix \"Application Setup\"' about \"Name Service Switch\""
--8<---------------cut here---------------end--------------->8---

  reply	other threads:[~2020-10-13 16:46 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02 17:35 [bug#43769] [PATCH 0/2] Minor first user-experience tweaks zimoun
2020-10-02 17:40 ` [bug#43769] [PATCH 1/2] Add symbolic links for supported shell completions zimoun
2020-10-02 17:42 ` [bug#43769] [PATCH 2/2] Check the daemon 'nscd' and suggest it zimoun
2020-10-03 18:44 ` [bug#43769] [PATCH v2 1/2] Add symbolic links for supported shell completions zimoun
2020-10-03 18:44   ` [bug#43769] [PATCH v2 2/2] Check the service 'nscd' and suggest it zimoun
2020-10-03 19:14     ` Tobias Geerinckx-Rice via Guix-patches via
2020-10-05  8:08       ` Ludovic Courtès
2020-10-05  9:19         ` zimoun
2020-10-05 12:28         ` Tobias Geerinckx-Rice via Guix-patches via
2020-10-13 16:45           ` zimoun [this message]
2020-10-03 19:11   ` [bug#43769] [PATCH v2 1/2] Add symbolic links for supported shell completions Tobias Geerinckx-Rice via Guix-patches via
2020-10-05  8:09     ` Ludovic Courtès
2020-10-05  9:23       ` zimoun
2020-10-05 12:02         ` Ludovic Courtès
2020-10-13 17:12 ` [bug#43769] [PATCH v3 2/2] Check the service 'nscd' and suggest it zimoun
2020-10-13 17:12   ` [bug#43769] [PATCH v3 1/2] Add symbolic links for supported shell completions zimoun
2020-10-16  9:39   ` bug#43769: [PATCH v3 2/2] Check the service 'nscd' and suggest it Ludovic Courtès

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:

  List information:

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

  git send-email \ \ \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

unofficial mirror of 

This inbox may be cloned and mirrored by anyone:

	git clone --mirror guix-patches/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 guix-patches guix-patches/ \
	public-inbox-index guix-patches

Example config snippet for mirrors.
Newsgroup available over NNTP:

AGPL code for this site: git clone