793231f
diff -up ypbind-mt-1.37.2/man/ypbind.8.helpman ypbind-mt-1.37.2/man/ypbind.8
793231f
--- ypbind-mt-1.37.2/man/ypbind.8.helpman	2013-11-06 16:02:42.000000000 +0100
793231f
+++ ypbind-mt-1.37.2/man/ypbind.8	2014-08-15 10:40:21.261195488 +0200
9ea112d
@@ -31,9 +31,11 @@
9ea112d
 ypbind \- NIS binding process
9ea112d
 .SH "SYNOPSIS"
9ea112d
 .HP \w'\fBypbind\fR\ 'u
9ea112d
-\fBypbind\fR [\-c] [\-d | \-debug] [\-verbose] [\-n | \-forground] [\-broadcast] [\-broken\-server] [\-ypset] [\-ypsetme] [\-no\-ping] [\-f\ \fIconfigfile\fR] [\-local\-only] [\-ping\-interval\ \fIping\-interval\fR] [\-rebind\-interval] [\-no\-dbus]
9ea112d
+\fBypbind\fR [\-broadcast\ |\ \-ypset\ |\ \-ypsetme] [\-c] [\-f\ \fIconfigfile\fR] [\-no\-ping] [\-broken\-server] [\-local\-only] [\-i\ |\ \-ping\-interval\ \fIping\-interval\fR] [\-r\ |\ \-rebind\-interval\ \fIrebind\-interval\fR] [\-d\ |\ \-debug] [\-v\ |\ \-verbose] [\-n\ |\ \-foreground] [\-p\ \fIport\fR] [\-log\ \fIlog\-options\fR] [\-no\-dbus]
9ea112d
 .HP \w'\fBypbind\fR\ 'u
9ea112d
 \fBypbind\fR \-\-version
9ea112d
+.HP \w'\fBypbind\fR\ 'u
9ea112d
+\fBypbind\fR \-\-help
9ea112d
 .SH "DESCRIPTION"
9ea112d
 .PP
9ea112d
 \fBypbind\fR
c81b08d
@@ -58,6 +60,8 @@ will send a ping to all servers and bind
c81b08d
 .PP
c81b08d
 Unless the option
c81b08d
 \fB\-debug\fR
c81b08d
+or
c81b08d
+\fB\-foreground\fR
c81b08d
 is used, ypbind detaches itself from the controlling terminal and puts itself into background\&.
c81b08d
 \fBypbind\fR
c81b08d
 uses
c81b08d
@@ -103,7 +107,64 @@ will behave as usual and assumes there i
c81b08d
 \fBypbind\fR
c81b08d
 will reread all configuration files, registers at the local portmapper and try to search NIS servers\&. If NetworkManager drops a connection,
c81b08d
 \fBypbind\fR
c81b08d
-will unregister from portmapper\&.
c81b08d
+will unregister from portmapper\&. Option
c81b08d
+\fB\-no\-dbus\fR
c81b08d
+disables this feature and
c81b08d
+\fBypbind\fR
c81b08d
+behaves like no NetworkManager is running at startup. Also in case one of the NIS servers
c81b08d
+\fBypbind\fR
c81b08d
+is configured to connect to is a localhost,
c81b08d
+\fBypbind\fR
c81b08d
+behaves like it is a working network connection.
c81b08d
+.PP
c81b08d
+In Fedora we use
c81b08d
+\fBsystemd\fR
c81b08d
+for starting services. We need to finish starting process of
c81b08d
+\fBypbind\fR
c81b08d
+service not before service is fully started, which means
c81b08d
+\fBypbind\fR
c81b08d
+daemon is prepared to answer. There is a test script /usr/libexec/ypbind-post-waitbind used in
c81b08d
+\fBypbind.service\fR,
c81b08d
+that waits for
c81b08d
+\fBypbind\fR
c81b08d
+daemon to be fully connected to NIS server and waits by default up to 45s. Sometimes this is not enough, because network set up can take longer than 45s during boot, so starting
c81b08d
+\fBypbind.service\fR
c81b08d
+fails. User can increase the
c81b08d
+\fBtimeout\fR
c81b08d
+by setting an environment variable
c81b08d
+\fBNISTIMEOUT\fR
c81b08d
+in /etc/sysconfig/ypbind. For example NISTIMEOUT=180 means ypbind will wait up to 180 seconds for binding to a NIS server.
c81b08d
+Another option is to enable NetworkManager-wait-online.service, which will make
c81b08d
+\fBypbind\fR
c81b08d
+to wait until network is properly set up.
c81b08d
+.PP
c81b08d
+In case something needs to be changed in the
c81b08d
+\fBypbind.service\fR,
c81b08d
+it is adviced not to change the
c81b08d
+\fBypbind.service\fR
c81b08d
+directly, but rather to create a new file under /etc/systemd/system/ypbind.service.d/\&, i.e. if we need to start
c81b08d
+\fBypbind\fR
c81b08d
+before service foo.service, we can create file /etc/systemd/system/ypbind.service.d/wait-foo.conf with the following content:
c81b08d
+
c81b08d
+        [Service]
c81b08d
+        Before=foo.service
c81b08d
+.PP
c81b08d
+If you need to pass other arguments to
c81b08d
+\fBypbind\fR
c81b08d
+daemon withing systemd unit file, you can set these arguments as
c81b08d
+\fBOTHER_YPBIND_OPTS\fR
c81b08d
+environment variable in /etc/sysconfig/ypbind. For example in order to set a fixed port ypbind should run on, you can specify OTHER_YPBIND_OPTS="-p 876" in /etc/sysconfig/ypbind\&.
c81b08d
+.PP
c81b08d
+DHCP client by defualt changes
c81b08d
+\fB/etc/yp.conf\fR
c81b08d
+in case DHCP server sends NIS configuration in the respond. In that case /etc/dhcp/dhclient.d/nis.sh changes
c81b08d
+\fB/etc/yp.conf\fR
c81b08d
+according such configuration and creates a back\-up copy of the original configuration file into /var/lib/dhclient/nis.conf.predhclient.$interface.
c81b08d
+In order to disable changing
c81b08d
+\fB/etc/yp.conf\fR
c81b08d
+by DHCP client, add
c81b08d
+\fBPEERNIS=no\fR
c81b08d
+into /etc/sysconfig/network.
c81b08d
 .SH "OPTIONS"
c81b08d
 .PP
c81b08d
 \fB\-broadcast\fR
793231f
@@ -200,6 +261,15 @@ The default value for
793231f
 to check, if a NIS server is still reachable, is 20 seconds\&. With this options another frequency in seconds can be specified\&.
9ea112d
 .RE
9ea112d
 .PP
9ea112d
+\fB\-p port\fR
9ea112d
+.RS 4
9ea112d
+Lets
9ea112d
+\fBypbind\fR
9ea112d
+listen on a specified
9ea112d
+\fBport\fR
9ea112d
+number, rather than asking portmapper to assing a port for it\&.
9ea112d
+.RE
9ea112d
+.PP
793231f
 \fB\-r\fR, \fB\-rebind\-interval\fR
9ea112d
 .RS 4
9ea112d
 The default value for
793231f
@@ -207,6 +277,13 @@ The default value for
9ea112d
 to search for the fastest NIS server is 900 seconds (15 minutes)\&. With this options another frequency in seconds can be specified\&.
9ea112d
 .RE
9ea112d
 .PP
9ea112d
+\fB\-log\fR log\-options
9ea112d
+.RS 4
9ea112d
+Allows to log special events\&.
9ea112d
+\fBlog\-options\fR
9ea112d
+is a logical sum of values for particular events \- 1 for logging rpc calls, 2 for logging broken server calls, 4 for logging server changes\&.
9ea112d
+.RE
9ea112d
+.PP
9ea112d
 \fB\-no\-dbus\fR
9ea112d
 .RS 4
9ea112d
 Disables DBUS support if compiled in\&.
793231f
diff -up ypbind-mt-1.37.2/man/yp.conf.5.helpman ypbind-mt-1.37.2/man/yp.conf.5
793231f
--- ypbind-mt-1.37.2/man/yp.conf.5.helpman	2013-04-09 14:31:05.000000000 +0200
793231f
+++ ypbind-mt-1.37.2/man/yp.conf.5	2014-08-15 10:38:21.610870737 +0200
c81b08d
@@ -74,6 +74,10 @@ If no other server is given or all of th
c81b08d
 If for a specific domain the broadcast option and fixed server are given,
c81b08d
 \fBypbind\-mt\fR
c81b08d
 tries at first the given servers before falling back to broadcasting for a running server\&.
c81b08d
+.PP
c81b08d
+Content of
c81b08d
+\fB/etc/yp.conf\fR
c81b08d
+can be changed by DHCP client, for more info see \fBypbind\fR(8).
c81b08d
 .SH "SEE ALSO"
c81b08d
 .PP
c81b08d
 \fBypbind\fR(8)
793231f
diff -up ypbind-mt-1.37.2/src/ypbind-mt.c.helpman ypbind-mt-1.37.2/src/ypbind-mt.c
793231f
--- ypbind-mt-1.37.2/src/ypbind-mt.c.helpman	2013-04-09 16:03:47.000000000 +0200
793231f
+++ ypbind-mt-1.37.2/src/ypbind-mt.c	2014-08-15 10:38:21.610870737 +0200
9ea112d
@@ -513,12 +513,17 @@ usage (int ret)
9ea112d
     output = stdout;
9ea112d
 
9ea112d
   fputs (_("Usage:\n"), output);
9ea112d
-  fputs (_("\typbind [-broadcast | -ypset | -ypsetme] [-f configfile]\n\t  [-no-ping] [-broken-server] [-local-only] [-i ping-interval]\n\t  [-r rebind-interval] [-debug] [-verbose] [-n | -foreground]\n"), output);
9ea112d
+  fputs ("\typbind [-broadcast | -ypset | -ypsetme] [-f configfile] [-no-ping]\n"
9ea112d
+           "\t  [-broken-server] [-local-only] [-i | -ping-interval ping-interval]\n"
9ea112d
+           "\t  [-r | -rebind-interval rebind-interval] [-d | -debug] [-v | -verbose]\n"
9ea112d
+           "\t  [-n | -foreground] [-p port] [-log log-options]", output);
9ea112d
 #ifdef USE_DBUS_NM
9ea112d
-  fputs (_("\t  [-no-dbus]\n"), output);
9ea112d
+  fputs (" [-no-dbus]", output);
9ea112d
 #endif
9ea112d
-  fputs (_("\typbind -c [-f configfile]\n"), output);
9ea112d
-  fputs (_("\typbind --version\n"), output);
9ea112d
+  fputs ("\n", output);
9ea112d
+  fputs ("\typbind -c [-f configfile]\n", output);
9ea112d
+  fputs ("\typbind --version\n", output);
9ea112d
+  fputs ("\typbind --help\n", output);
9ea112d
   exit (ret);
9ea112d
 }
9ea112d