DHCP changes documented

Related: #1031093
This commit is contained in:
Honza Horák 2013-11-18 13:05:19 +01:00
parent d733717f89
commit c81b08de2d
3 changed files with 110 additions and 55 deletions

View File

@ -1,6 +1,6 @@
diff -up ypbind-mt-1.37.1/man/ypbind.8.helpman ypbind-mt-1.37.1/man/ypbind.8
--- ypbind-mt-1.37.1/man/ypbind.8.helpman 2013-08-19 14:54:57.322653921 +0200
+++ ypbind-mt-1.37.1/man/ypbind.8 2013-08-19 14:54:57.325653921 +0200
diff -rup ypbind-mt-1.37.1-orig/man/ypbind.8 ypbind-mt-1.37.1/man/ypbind.8
--- ypbind-mt-1.37.1-orig/man/ypbind.8 2013-04-09 14:31:04.000000000 +0200
+++ ypbind-mt-1.37.1/man/ypbind.8 2013-11-18 13:00:13.901578756 +0100
@@ -31,9 +31,11 @@
ypbind \- NIS binding process
.SH "SYNOPSIS"
@ -14,7 +14,82 @@ diff -up ypbind-mt-1.37.1/man/ypbind.8.helpman ypbind-mt-1.37.1/man/ypbind.8
.SH "DESCRIPTION"
.PP
\fBypbind\fR
@@ -169,7 +171,7 @@ on the local machine is allowed to chang
@@ -58,6 +60,8 @@ will send a ping to all servers and bind
.PP
Unless the option
\fB\-debug\fR
+or
+\fB\-foreground\fR
is used, ypbind detaches itself from the controlling terminal and puts itself into background\&.
\fBypbind\fR
uses
@@ -103,7 +107,64 @@ will behave as usual and assumes there i
\fBypbind\fR
will reread all configuration files, registers at the local portmapper and try to search NIS servers\&. If NetworkManager drops a connection,
\fBypbind\fR
-will unregister from portmapper\&.
+will unregister from portmapper\&. Option
+\fB\-no\-dbus\fR
+disables this feature and
+\fBypbind\fR
+behaves like no NetworkManager is running at startup. Also in case one of the NIS servers
+\fBypbind\fR
+is configured to connect to is a localhost,
+\fBypbind\fR
+behaves like it is a working network connection.
+.PP
+In Fedora we use
+\fBsystemd\fR
+for starting services. We need to finish starting process of
+\fBypbind\fR
+service not before service is fully started, which means
+\fBypbind\fR
+daemon is prepared to answer. There is a test script /usr/libexec/ypbind-post-waitbind used in
+\fBypbind.service\fR,
+that waits for
+\fBypbind\fR
+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
+\fBypbind.service\fR
+fails. User can increase the
+\fBtimeout\fR
+by setting an environment variable
+\fBNISTIMEOUT\fR
+in /etc/sysconfig/ypbind. For example NISTIMEOUT=180 means ypbind will wait up to 180 seconds for binding to a NIS server.
+Another option is to enable NetworkManager-wait-online.service, which will make
+\fBypbind\fR
+to wait until network is properly set up.
+.PP
+In case something needs to be changed in the
+\fBypbind.service\fR,
+it is adviced not to change the
+\fBypbind.service\fR
+directly, but rather to create a new file under /etc/systemd/system/ypbind.service.d/\&, i.e. if we need to start
+\fBypbind\fR
+before service foo.service, we can create file /etc/systemd/system/ypbind.service.d/wait-foo.conf with the following content:
+
+ [Service]
+ Before=foo.service
+.PP
+If you need to pass other arguments to
+\fBypbind\fR
+daemon withing systemd unit file, you can set these arguments as
+\fBOTHER_YPBIND_OPTS\fR
+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\&.
+.PP
+DHCP client by defualt changes
+\fB/etc/yp.conf\fR
+in case DHCP server sends NIS configuration in the respond. In that case /etc/dhcp/dhclient.d/nis.sh changes
+\fB/etc/yp.conf\fR
+according such configuration and creates a back\-up copy of the original configuration file into /var/lib/dhclient/nis.conf.predhclient.$interface.
+In order to disable changing
+\fB/etc/yp.conf\fR
+by DHCP client, add
+\fBPEERNIS=no\fR
+into /etc/sysconfig/network.
.SH "OPTIONS"
.PP
\fB\-broadcast\fR
@@ -139,7 +200,7 @@ on the local machine is allowed to chang
only checks if the config file has syntax errors and exits\&.
.RE
.PP
@ -23,7 +98,7 @@ diff -up ypbind-mt-1.37.1/man/ypbind.8.helpman ypbind-mt-1.37.1/man/ypbind.8
.RS 4
starts
\fBypbind\fR
@@ -178,13 +180,13 @@ in debug mode\&.
@@ -148,13 +209,13 @@ in debug mode\&.
will not put itself into background, and error messages and debug output are written to standard error\&.
.RE
.PP
@ -39,7 +114,7 @@ diff -up ypbind-mt-1.37.1/man/ypbind.8.helpman ypbind-mt-1.37.1/man/ypbind.8
.RS 4
Causes
\fBypbind\fR
@@ -193,7 +195,7 @@ to syslog(2) any and all changes in the
@@ -163,7 +224,7 @@ to syslog(2) any and all changes in the
.PP
\fB\-broken\-server\fR
.RS 4
@ -48,7 +123,7 @@ diff -up ypbind-mt-1.37.1/man/ypbind.8.helpman ypbind-mt-1.37.1/man/ypbind.8
\fBypbind\fR
accept answers from servers running on an illegal port number\&. This should usually be avoided, but is required by some
\fBypserv\fR(8)
@@ -223,20 +225,36 @@ and not
@@ -193,20 +254,36 @@ and not
will only bind to the loopback device and is not reachable from a remote network\&.
.RE
.PP
@ -87,9 +162,26 @@ diff -up ypbind-mt-1.37.1/man/ypbind.8.helpman ypbind-mt-1.37.1/man/ypbind.8
\fB\-no\-dbus\fR
.RS 4
Disables DBUS support if compiled in\&.
diff -up ypbind-mt-1.37.1/src/ypbind-mt.c.helpman ypbind-mt-1.37.1/src/ypbind-mt.c
--- ypbind-mt-1.37.1/src/ypbind-mt.c.helpman 2013-04-09 16:03:47.000000000 +0200
+++ ypbind-mt-1.37.1/src/ypbind-mt.c 2013-08-19 14:54:57.326653921 +0200
Only in ypbind-mt-1.37.1/man: ypbind.8.helpman
Only in ypbind-mt-1.37.1/man: ypbind.8.nisdomain
diff -rup ypbind-mt-1.37.1-orig/man/yp.conf.5 ypbind-mt-1.37.1/man/yp.conf.5
--- ypbind-mt-1.37.1-orig/man/yp.conf.5 2013-04-09 14:31:05.000000000 +0200
+++ ypbind-mt-1.37.1/man/yp.conf.5 2013-11-18 13:00:13.902578756 +0100
@@ -74,6 +74,10 @@ If no other server is given or all of th
If for a specific domain the broadcast option and fixed server are given,
\fBypbind\-mt\fR
tries at first the given servers before falling back to broadcasting for a running server\&.
+.PP
+Content of
+\fB/etc/yp.conf\fR
+can be changed by DHCP client, for more info see \fBypbind\fR(8).
.SH "SEE ALSO"
.PP
\fBypbind\fR(8)
Only in ypbind-mt-1.37.1/man: yp.conf.5.helpman
diff -rup ypbind-mt-1.37.1-orig/src/ypbind-mt.c ypbind-mt-1.37.1/src/ypbind-mt.c
--- ypbind-mt-1.37.1-orig/src/ypbind-mt.c 2013-04-09 16:03:47.000000000 +0200
+++ ypbind-mt-1.37.1/src/ypbind-mt.c 2013-11-18 13:00:13.902578756 +0100
@@ -513,12 +513,17 @@ usage (int ret)
output = stdout;
@ -112,3 +204,4 @@ diff -up ypbind-mt-1.37.1/src/ypbind-mt.c.helpman ypbind-mt-1.37.1/src/ypbind-mt
exit (ret);
}
Only in ypbind-mt-1.37.1/src: ypbind-mt.c.helpman

View File

@ -1,40 +0,0 @@
diff -up ypbind-mt-1.37.1/man/ypbind.8.nistimeout ypbind-mt-1.37.1/man/ypbind.8
--- ypbind-mt-1.37.1/man/ypbind.8.nistimeout 2013-04-09 14:31:04.000000000 +0200
+++ ypbind-mt-1.37.1/man/ypbind.8 2013-08-19 14:53:53.837656513 +0200
@@ -104,6 +104,36 @@ will behave as usual and assumes there i
will reread all configuration files, registers at the local portmapper and try to search NIS servers\&. If NetworkManager drops a connection,
\fBypbind\fR
will unregister from portmapper\&.
+.PP
+In Fedora we use
+\fBsystemd\fR
+for starting services. We need to finish starting process of
+\fBypbind\fR
+service not before service is fully started, which means
+\fBypbind\fR
+daemon is prepared to answer. There is a test script /usr/libexec/ypbind-post-waitbind used in
+\fBypbind.service\fR,
+that waits for
+\fBypbind\fR
+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
+\fBypbind.service\fR
+fails. User can increase the
+\fBtimeout\fR
+by setting an environment variable
+\fBNISTIMEOUT\fR
+in /etc/sysconfig/ypbind. For example NISTIMEOUT=180 means ypbind will wait up to 180 seconds for binding to a NIS server.
+Another option is to enable NetworkManager-wait-online.service and add an ordering rule into
+\fBypbind.service\fR,
+ideally by creating /etc/systemd/system/ypbind.service.d/wait-online.conf with the following content:
+
+ [Service]
+ After=NetworkManager-wait-online.service
+
+If you need to pass other arguments to
+\fBypbind\fR
+daemon withing systemd unit file, you can set these arguments as
+\fBOTHER_YPBIND_OPTS\fR
+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\&.
.SH "OPTIONS"
.PP
\fB\-broadcast\fR

View File

@ -2,7 +2,7 @@ Summary: The NIS daemon which binds NIS clients to an NIS domain
Name: ypbind
Epoch: 3
Version: 1.37.1
Release: 7%{?dist}
Release: 8%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source0: http://www.linux-nis.org/download/ypbind-mt/ypbind-mt-%{version}.tar.bz2
@ -16,8 +16,7 @@ Source5: ypbind-post-waitbind
# 'ypbind-mt' would allow us to drop it.
Patch1: ypbind-1.11-gettextdomain.patch
# Not sent to upstream.
Patch2: ypbind-mt-1.36-nistimeout.patch
Patch3: ypbind-helpman.patch
Patch2: ypbind-helpman.patch
# This is for /bin/systemctl
Requires(post): systemd
Requires(preun): systemd
@ -48,8 +47,7 @@ also need to install the ypserv package to a machine on your network.
%prep
%setup -q -n ypbind-mt-%{version}
%patch1 -p1 -b .gettextdomain
%patch2 -p1 -b .nistimeout
%patch3 -p1 -b .helpman
%patch2 -p1 -b .helpman
autoreconf
@ -98,6 +96,10 @@ install -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{_libexecdir}/ypbind-post-waitbind
%doc README NEWS COPYING
%changelog
* Mon Nov 18 2013 Honza Horak <hhorak@redhat.com> - 3:1.37.1-8
- DHCP changes documented
Related: #1031093
* Thu Aug 29 2013 Honza Horak <hhorak@redhat.com> - 3:1.37.1-7
- Add network-online.target dependency
Resolves: #1002295