[ypserv] Checking if domainname is set moved from ypserv.service to yppasswdd.service Related: #456249

Honza Horak hhorak at fedoraproject.org
Mon May 14 11:47:03 UTC 2012


commit e966eb4663cb38bf108641035b578c7aafff1b0a
Author: Honza HorĂ¡k <hhorak at redhat.com>
Date:   Mon May 14 13:45:56 2012 +0200

    Checking if domainname is set moved from ypserv.service to yppasswdd.service
    Related: #456249

 ypserv-pre-setdomain => yppasswdd-pre-setdomain |    6 +++---
 yppasswdd.service                               |    1 +
 ypserv.service                                  |    1 -
 ypserv.spec                                     |   11 ++++++++---
 4 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/ypserv-pre-setdomain b/yppasswdd-pre-setdomain
similarity index 74%
rename from ypserv-pre-setdomain
rename to yppasswdd-pre-setdomain
index 0c1f4e8..b72ba15 100644
--- a/ypserv-pre-setdomain
+++ b/yppasswdd-pre-setdomain
@@ -1,9 +1,9 @@
 #!/bin/sh
 #
-# ypserv-domain
+# yppasswdd-pre-setdomain
 #
 # description: This is part of former ypserv init script, which is used 
-#              to setup proper domainname before starting ypserv daemon 
+#              to setup proper domainname before starting yppasswdd daemon
 #              itself. If $NISDOMAIN is not defined, it fails. 
 #
 
@@ -14,7 +14,7 @@ if [ "$DOMAINNAME" = "(none)" -o "$DOMAINNAME" = "" ]; then
         domainname $NISDOMAIN
         echo $"'$NISDOMAIN' (environment variable)"
     else # no domainname found
-        logger -t ypserv $"domain not found"
+        logger -t yppasswdd $"domain not found"
         exit 1
     fi
 fi
diff --git a/yppasswdd.service b/yppasswdd.service
index 1e3e402..9adcec2 100644
--- a/yppasswdd.service
+++ b/yppasswdd.service
@@ -5,6 +5,7 @@ After=syslog.target network.target rpcbind.service
 
 [Service]
 EnvironmentFile=-/etc/sysconfig/yppasswdd
+ExecStartPre=/usr/lib/ypserv/yppasswdd-pre-setdomain
 ExecStart=/usr/sbin/rpc.yppasswdd.env
 
 [Install]
diff --git a/ypserv.service b/ypserv.service
index 0733a70..0868394 100644
--- a/ypserv.service
+++ b/ypserv.service
@@ -5,7 +5,6 @@ After=syslog.target network.target rpcbind.service
 
 [Service]
 EnvironmentFile=-/etc/sysconfig/network
-ExecStartPre=/usr/lib/ypserv/ypserv-pre-setdomain
 ExecStart=/usr/sbin/ypserv -f $YPSERV_ARGS
 
 [Install]
diff --git a/ypserv.spec b/ypserv.spec
index bbac366..14ef17d 100644
--- a/ypserv.spec
+++ b/ypserv.spec
@@ -4,7 +4,7 @@ Summary: The NIS (Network Information Service) server
 Url: http://www.linux-nis.org/nis/ypserv/index.html
 Name: ypserv
 Version: 2.27
-Release: 4%{?dist}
+Release: 5%{?dist}
 License: GPLv2
 Group: System Environment/Daemons
 Source0: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/ypserv-%{version}.tar.bz2
@@ -12,7 +12,7 @@ Source1: ypserv.service
 Source2: yppasswdd.service
 Source3: ypxfrd.service
 Source4: rpc.yppasswdd.env
-Source5: ypserv-pre-setdomain
+Source5: yppasswdd-pre-setdomain
 
 Requires: gawk, make, portmap, bash >= 2.0
 Requires: qdbm
@@ -106,7 +106,7 @@ install -m 644 etc/ypserv.conf $RPM_BUILD_ROOT%{_sysconfdir}
 install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_unitdir}/ypserv.service
 install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_unitdir}/yppasswdd.service
 install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_unitdir}/ypxfrd.service
-install -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{scripts_path}/ypserv-pre-setdomain
+install -m 755 %{SOURCE5} $RPM_BUILD_ROOT%{scripts_path}/yppasswdd-pre-setdomain
 
 mkdir -p $RPM_BUILD_ROOT/etc/sysconfig
 cat >$RPM_BUILD_ROOT/etc/sysconfig/yppasswdd <<EOF
@@ -191,6 +191,11 @@ make -C /var/yp >&2 || :
 %{_includedir}/*/*
 
 %changelog
+* Mon May 14 2012 Honza Horak <hhorak at redhat.com> - 2.27-5
+- Checking if domainname is set moved from ypserv.service
+  to yppasswdd.service
+  Related: #456249
+
 * Thu Apr 26 2012 Honza Horak <hhorak at redhat.com> - 2.27-4
 - Build against qdbm and rebuild maps after updating
 


More information about the scm-commits mailing list