#353867 Please add a silent option to rpcinfo

Package:
rpcbind
Source:
rpcbind
Description:
converts RPC program numbers into universal addresses
Submitter:
Stephan Krempel
Date:
2019-10-26 07:42:03 UTC
Severity:
wishlist
#353867#5
Date:
2006-02-21 14:55:17 UTC
From:
To:
I suggest the attached patch for nfs-kernel-server init script. With it applied
the confusing console output about svc version mismatch produced by rpcinfo
when running with the start option gets suppressed.

Thanks for your work

Stephan


*** Patch ***
diff -Nau nfs-kernel-server.orig nfs-kernel-server
--- nfs-kernel-server.orig      2004-12-04 22:39:05.000000000 +0100
+++ nfs-kernel-server   2006-02-21 15:49:34.000000000 +0100
@@ -88,7 +88,7 @@
                    }
                fi

-               $PREFIX/bin/rpcinfo -u localhost nfs 3 >/dev/null 2>&1 ||
+               $PREFIX/bin/rpcinfo -u localhost nfs 3 >/dev/null 2>&1 \
+                                                      /dev/console>&1 ||
                    RPCMOUNTDOPTS="$RPCMOUNTDOPTS --no-nfs-version 3"

                [ -z "$ClearAddr" ] || echo "nfsd 127.0.0.1 1" >/proc/net/rpc/auth.unix.ip/channel
*** Patch End ***

#353867#10
Date:
2006-03-26 13:04:58 UTC
From:
To:
tags 353867 - patch
thanks

This patch does not what you think it does. More specifically, it is
identical to

  $PREFIX/bin/rpcinfo -u localhost nfs 3 /dev/console >/dev/null 2>&1

as you cannot route arbitrary files around like that, only file descriptors.
rpcinfo naturally takes no "/dev/console" parameter, and thus exits with a
syntax error, which is sent to /dev/null.

You might want to ask the libc6 people to add a "silent" option to rpcinfo,
or at least something that doesn't open /dev/console if that is indeed what's
happening.

/* Steinar */

#353867#23
Date:
2019-10-26 07:22:57 UTC
From:
To:
Control:; reassign -1 rpcbind

This bug has been assigned to libc6 which no longer ships the rpcinfo
program.

AFAICT there is no such option, so this bug might still be relevant.

Cheers,
       Sven