Fixed empty domain handling in ypinit script

Resolves: #751427
This commit is contained in:
Honza Horák 2011-11-28 11:00:39 +01:00
parent 0ead12864c
commit f983bc7a87
3 changed files with 31 additions and 1 deletions

View File

@ -0,0 +1,12 @@
diff -up ypserv-2.24/scripts/ypinit.in.emptydomain ypserv-2.24/scripts/ypinit.in
--- ypserv-2.24/scripts/ypinit.in.emptydomain 2001-11-26 21:02:49.000000000 +0100
+++ ypserv-2.24/scripts/ypinit.in 2011-11-28 10:56:54.272418093 +0100
@@ -156,7 +156,7 @@ then
exit 1
fi
-if [ -z "$DOMAIN" ]
+if [ "${DOMAIN}x" = "x" ] || [ "${DOMAIN}" = "(none)" ]
then
echo "The local host's domain name hasn't been set. Please set it."
exit 1

View File

@ -0,0 +1,12 @@
diff -up ypserv-2.26/scripts/ypinit.in.emptydomain ypserv-2.26/scripts/ypinit.in
--- ypserv-2.26/scripts/ypinit.in.emptydomain 2011-11-24 09:12:31.267702768 +0100
+++ ypserv-2.26/scripts/ypinit.in 2011-11-24 09:13:09.881700121 +0100
@@ -156,7 +156,7 @@ then
exit 1
fi
-if [ -z "$DOMAIN" ]
+if [ "${DOMAIN}x" = "x" ] || [ "${DOMAIN}" = "(none)" ]
then
echo "The local host's domain name hasn't been set. Please set it."
exit 1

View File

@ -2,7 +2,7 @@ Summary: The NIS (Network Information Service) server
Url: http://www.linux-nis.org/nis/ypserv/index.html
Name: ypserv
Version: 2.24
Release: 5%{?dist}
Release: 6%{?dist}
License: GPLv2
Group: System Environment/Daemons
Source0: ftp://ftp.kernel.org/pub/linux/utils/net/NIS/ypserv-%{version}.tar.bz2
@ -27,6 +27,7 @@ Patch6: ypserv-2.19-slp-warning.patch
Patch7: ypserv-2.24-staticanal.patch
Patch8: ypserv-2.24-manfix.patch
Patch9: ypserv-2.24-aliases.patch
Patch10: ypserv-2.24-emptydomain.patch
BuildRequires: gdbm-devel
%description
@ -57,6 +58,7 @@ machines.
%patch7 -p1 -b .staticanal
%patch8 -p1 -b .manfix
%patch9 -p1 -b .aliases
%patch10 -p1 -b .emptydomain
%build
cp etc/README etc/README.etc
@ -138,6 +140,10 @@ exit 0
%{_includedir}/*/*
%changelog
* Mon Nov 28 2011 Honza Horak <hhorak@redhat.com> - 2.24-6
- Fixed empty domain handling in ypinit script
Resolves: #751427
* Thu May 12 2011 Honza Horak <hhorak@redhat.com> - 2.24-5
- Changed the way how path is set in the previous change
(#699826)