Compare commits
5 Commits
Author | SHA1 | Date |
---|---|---|
Karel Klic | 0aeda49ae5 | |
Fedora Release Engineering | d195f1d967 | |
Karel Klíč | 8935bf66e1 | |
Karel Klíč | 4884aae2d1 | |
Jesse Keating | dadb615cb9 |
21
Makefile
21
Makefile
|
@ -1,21 +0,0 @@
|
||||||
# Makefile for source rpm: ypbind
|
|
||||||
# $Id: Makefile,v 1.2 2007/10/15 19:38:38 notting Exp $
|
|
||||||
NAME := ypbind
|
|
||||||
SPECFILE = $(firstword $(wildcard *.spec))
|
|
||||||
|
|
||||||
define find-makefile-common
|
|
||||||
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$d/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
|
|
||||||
endef
|
|
||||||
|
|
||||||
MAKEFILE_COMMON := $(shell $(find-makefile-common))
|
|
||||||
|
|
||||||
ifeq ($(MAKEFILE_COMMON),)
|
|
||||||
# attempt a checkout
|
|
||||||
define checkout-makefile-common
|
|
||||||
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
|
|
||||||
endef
|
|
||||||
|
|
||||||
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
|
|
||||||
endif
|
|
||||||
|
|
||||||
include $(MAKEFILE_COMMON)
|
|
15
nis.sh
15
nis.sh
|
@ -38,7 +38,11 @@ save_config_file() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -e ${origfile} ]; then
|
if [ -e ${origfile} ]; then
|
||||||
mv ${origfile} ${savefile}
|
# cp+rm instead of mv: preserve SELinux context
|
||||||
|
# rhbz#509240
|
||||||
|
# Do not rely on restorecon.
|
||||||
|
cp -c ${origfile} ${savefile}
|
||||||
|
rm ${origfile}
|
||||||
else
|
else
|
||||||
echo > ${savefile}
|
echo > ${savefile}
|
||||||
fi
|
fi
|
||||||
|
@ -53,6 +57,7 @@ nis_config() {
|
||||||
save_config_file ${CONF}
|
save_config_file ${CONF}
|
||||||
let contents=0
|
let contents=0
|
||||||
echo '# generated by /sbin/dhclient-script' > ${CONF}
|
echo '# generated by /sbin/dhclient-script' > ${CONF}
|
||||||
|
fixContext ${CONF}
|
||||||
|
|
||||||
if [ -n "${new_nis_servers}" ]; then
|
if [ -n "${new_nis_servers}" ]; then
|
||||||
for i in ${new_nis_servers} ; do
|
for i in ${new_nis_servers} ; do
|
||||||
|
@ -73,6 +78,7 @@ nis_config() {
|
||||||
elif [ -n "${new_nis_servers}" ]; then
|
elif [ -n "${new_nis_servers}" ]; then
|
||||||
save_config_file ${CONF}
|
save_config_file ${CONF}
|
||||||
echo '# generated by /sbin/dhclient-script' > ${CONF}
|
echo '# generated by /sbin/dhclient-script' > ${CONF}
|
||||||
|
fixContext ${CONF}
|
||||||
let contents=0
|
let contents=0
|
||||||
|
|
||||||
for i in ${new_nis_servers} ; do
|
for i in ${new_nis_servers} ; do
|
||||||
|
@ -94,8 +100,11 @@ nis_restore() {
|
||||||
if [ ! "${PEERNIS}" = "no" ]; then
|
if [ ! "${PEERNIS}" = "no" ]; then
|
||||||
if [ -f ${SAVEDIR}/${CONF}.predhclient.${interface} ]; then
|
if [ -f ${SAVEDIR}/${CONF}.predhclient.${interface} ]; then
|
||||||
rm -f ${CONF}
|
rm -f ${CONF}
|
||||||
mv -f ${SAVEDIR}/${CONF}.predhclient.${interface} ${CONF}
|
# cp+rm instead of mv: preserve SELinux context
|
||||||
fixContext /etc/yp.conf
|
# rhbz#509240
|
||||||
|
cp -c ${SAVEDIR}/${CONF}.predhclient.${interface} ${CONF}
|
||||||
|
rm ${SAVEDIR}/${CONF}.predhclient.${interface}
|
||||||
|
fixContext ${CONF}
|
||||||
if [ -x /etc/rc.d/init.d/ypbind ] && [ -r /var/run/ypbind.pid ]; then
|
if [ -x /etc/rc.d/init.d/ypbind ] && [ -r /var/run/ypbind.pid ]; then
|
||||||
service ypbind restart >/dev/null 2>&1
|
service ypbind restart >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -66,8 +66,7 @@ start() {
|
||||||
if [ -n "$NISDOMAIN" ]; then
|
if [ -n "$NISDOMAIN" ]; then
|
||||||
action $"domain is '$NISDOMAIN' " domainname $NISDOMAIN
|
action $"domain is '$NISDOMAIN' " domainname $NISDOMAIN
|
||||||
else # See if the domain is set in config file
|
else # See if the domain is set in config file
|
||||||
NISDOMAIN=`grep "domain" /etc/yp.conf | grep -v ^# | \
|
NISDOMAIN=`awk '{ if ($1 == "domain") {print $2; exit} }' /etc/yp.conf`
|
||||||
awk '{print $2}'`
|
|
||||||
if [ -n "$NISDOMAIN" ]; then
|
if [ -n "$NISDOMAIN" ]; then
|
||||||
action $"domain is '$NISDOMAIN' " \
|
action $"domain is '$NISDOMAIN' " \
|
||||||
domainname $NISDOMAIN
|
domainname $NISDOMAIN
|
||||||
|
|
13
ypbind.spec
13
ypbind.spec
|
@ -1,7 +1,7 @@
|
||||||
Summary: The NIS daemon which binds NIS clients to an NIS domain
|
Summary: The NIS daemon which binds NIS clients to an NIS domain
|
||||||
Name: ypbind
|
Name: ypbind
|
||||||
Version: 1.31
|
Version: 1.31
|
||||||
Release: 2%{?dist}
|
Release: 5%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2
|
Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2
|
||||||
|
@ -85,6 +85,17 @@ fi
|
||||||
%doc README NEWS
|
%doc README NEWS
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Nov 19 2010 Karel Klic <kklic@redhat.com> - 3:1.31-5
|
||||||
|
- Better fix for #601296
|
||||||
|
|
||||||
|
* Tue Jun 8 2010 Karel Klic <kklic@redhat.com> - 3:1.31-4
|
||||||
|
- ypbind.init: take the first domainname in yp.conf and use
|
||||||
|
only that (rhbz#601296)
|
||||||
|
|
||||||
|
* Wed May 19 2010 Karel Klic <kklic@redhat.com> - 3:1.31-3
|
||||||
|
- Update SELinux context of /etc/yp.conf in nis.sh (rhbz#593278)
|
||||||
|
- Use cp+rm instead of mv in nis.sh (#509240)
|
||||||
|
|
||||||
* Thu Jan 21 2010 Karel Klic <kklic@redhat.com> - 3:1.31-2
|
* Thu Jan 21 2010 Karel Klic <kklic@redhat.com> - 3:1.31-2
|
||||||
- Rewrote initscript to become closer to Packaging:SysVInitScript
|
- Rewrote initscript to become closer to Packaging:SysVInitScript
|
||||||
Fedora guildeline. Also fixes rhbz#523913
|
Fedora guildeline. Also fixes rhbz#523913
|
||||||
|
|
Loading…
Reference in New Issue