Last few Merge Review related changes, Fix init script arguments and return
values
This commit is contained in:
parent
e68fad5932
commit
4c51d8b070
52
ypbind.init
52
ypbind.init
@ -12,6 +12,16 @@
|
|||||||
# processname: ypbind
|
# processname: ypbind
|
||||||
# config: /etc/yp.conf
|
# config: /etc/yp.conf
|
||||||
|
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: $ypbind
|
||||||
|
# Required-Start: $network $syslog
|
||||||
|
# Required-Stop: $network $syslog
|
||||||
|
# Default-Start:
|
||||||
|
# Default-Stop: 0 1 2 3 4 5 6
|
||||||
|
# Short-Description: start|stop|restart|condrestart|try-restart|reload|force-reload|status NIS client
|
||||||
|
# Description: This is a daemon which runs on NIS/YP clients and binds them to a NIS domain
|
||||||
|
### END INIT INFO
|
||||||
|
|
||||||
OTHER_YPBIND_OPTS=""
|
OTHER_YPBIND_OPTS=""
|
||||||
|
|
||||||
# Source function library.
|
# Source function library.
|
||||||
@ -99,7 +109,7 @@ start() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
sleep 2
|
sleep 2
|
||||||
echo -n "..."
|
echo -n "."
|
||||||
done
|
done
|
||||||
if [ $RETVAL -eq 0 ]; then
|
if [ $RETVAL -eq 0 ]; then
|
||||||
logger -t ypbind \
|
logger -t ypbind \
|
||||||
@ -121,10 +131,10 @@ stop() {
|
|||||||
echo -n $"Shutting down NIS service: "
|
echo -n $"Shutting down NIS service: "
|
||||||
killproc ypbind
|
killproc ypbind
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
if [ $RETVAL -eq 0 ] ; then
|
if [ $RETVAL -eq 0 ]; then
|
||||||
rm -f /var/lock/subsys/ypbind
|
rm -f /var/lock/subsys/ypbind
|
||||||
# if we used brute force (like kill -9) we don't want those around
|
# if we used brute force (like kill -9) we don't want those around
|
||||||
if [ x$(domainname) != x ] ; then
|
if [ x$(domainname) != x ]; then
|
||||||
rm -f /var/yp/binding/$(domainname)*
|
rm -f /var/yp/binding/$(domainname)*
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -138,30 +148,52 @@ restart() {
|
|||||||
start
|
start
|
||||||
}
|
}
|
||||||
|
|
||||||
|
reload() {
|
||||||
|
echo -n $"Reloading NIS service: "
|
||||||
|
p=`/sbin/pidof -o %PPID 'ypbind'`
|
||||||
|
RETVAL=$?
|
||||||
|
if [ "$RETVAL" -eq 0 ]; then
|
||||||
|
/bin/kill -HUP $p
|
||||||
|
RETVAL=$?
|
||||||
|
fi
|
||||||
|
[ "$RETVAL" -eq 0 ] && success || failure
|
||||||
|
echo
|
||||||
|
return $RETVAL
|
||||||
|
}
|
||||||
|
|
||||||
RETVAL=0
|
RETVAL=0
|
||||||
|
|
||||||
# See how we were called.
|
# See how we were called.
|
||||||
case "$1" in
|
case "$1" in
|
||||||
start)
|
start)
|
||||||
start
|
start
|
||||||
[ $? -eq 100 ] && stop
|
RETVAL=$?
|
||||||
|
if [ $RETVAL -eq 100 ]; then stop; RETVAL=1; fi
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
stop
|
stop
|
||||||
|
RETVAL=$?
|
||||||
;;
|
;;
|
||||||
status)
|
status)
|
||||||
status ypbind
|
status ypbind
|
||||||
RETVAL=$?
|
RETVAL=$?
|
||||||
;;
|
;;
|
||||||
restart|reload)
|
restart)
|
||||||
restart
|
restart
|
||||||
|
RETVAL=$?
|
||||||
;;
|
;;
|
||||||
condrestart)
|
condrestart|try-restart)
|
||||||
[ -f /var/lock/subsys/ypbind ] && restart || :
|
if [ -e /var/lock/subsys/ypbind ]; then restart; fi
|
||||||
|
;;
|
||||||
|
reload)
|
||||||
|
reload
|
||||||
|
;;
|
||||||
|
force-reload)
|
||||||
|
if ! reload; then restart; fi
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo $"Usage: $0 {start|stop|status|restart|condrestart}"
|
echo $"Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status}"
|
||||||
exit 1
|
RETVAL=3
|
||||||
esac
|
esac
|
||||||
|
|
||||||
exit $?
|
exit $RETVAL
|
||||||
|
17
ypbind.spec
17
ypbind.spec
@ -1,10 +1,10 @@
|
|||||||
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.20.4
|
Version: 1.20.4
|
||||||
Release: 9%{?dist}
|
Release: 10%{?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-%{PACKAGE_VERSION}.tar.bz2
|
Source0: ftp://ftp.us.kernel.org/pub/linux/utils/net/NIS/ypbind-mt-%{version}.tar.bz2
|
||||||
Url: http://www.linux-nis.org/nis/ypbind-mt/index.html
|
Url: http://www.linux-nis.org/nis/ypbind-mt/index.html
|
||||||
Source1: ypbind.init
|
Source1: ypbind.init
|
||||||
Patch1: ypbind-1.11-broadcast.patch
|
Patch1: ypbind-1.11-broadcast.patch
|
||||||
@ -22,7 +22,6 @@ Requires: rpcbind, yp-tools
|
|||||||
Epoch: 3
|
Epoch: 3
|
||||||
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
BuildRequires: autoconf, automake
|
|
||||||
BuildRequires: dbus-glib-devel, docbook-style-xsl
|
BuildRequires: dbus-glib-devel, docbook-style-xsl
|
||||||
|
|
||||||
%description
|
%description
|
||||||
@ -51,7 +50,6 @@ also need to install the ypserv package to a machine on your network.
|
|||||||
%patch5 -p1 -b .smartwrite
|
%patch5 -p1 -b .smartwrite
|
||||||
|
|
||||||
%build
|
%build
|
||||||
autoreconf
|
|
||||||
%configure --sbindir=/sbin
|
%configure --sbindir=/sbin
|
||||||
make
|
make
|
||||||
|
|
||||||
@ -92,18 +90,23 @@ fi
|
|||||||
%doc README NEWS
|
%doc README NEWS
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Tue Oct 21 2008 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.20.4-9
|
* Mon Nov 24 2008 Vitezslav Crhonek <vcrhonek@redhat.com> - 3:1.20.4-10
|
||||||
|
- Last few Merge Review related changes
|
||||||
|
- Fix init script arguments and return values
|
||||||
|
Resolves: #247104, #467861
|
||||||
|
|
||||||
|
* Tue Oct 21 2008 Vitezslav Crhonek <vcrhonek@redhat.com> - 3:1.20.4-9
|
||||||
- Merge Review - remove dot from end of the summary, convert all tags
|
- Merge Review - remove dot from end of the summary, convert all tags
|
||||||
in %%changelog to utf-8, escape %% character in changelog, fix
|
in %%changelog to utf-8, escape %% character in changelog, fix
|
||||||
requires and scriptlets, remove %%makeinstall, do not mark init
|
requires and scriptlets, remove %%makeinstall, do not mark init
|
||||||
script file as config, remove unused patches
|
script file as config, remove unused patches
|
||||||
Resolves: #226663
|
Resolves: #226663
|
||||||
|
|
||||||
* Tue Oct 21 2008 Vitezslav Crhonek <vcrhonek@redhat.com> - 1.20.4-8
|
* Tue Oct 21 2008 Vitezslav Crhonek <vcrhonek@redhat.com> - 3:1.20.4-8
|
||||||
- Rewrite binding files only when they are changed
|
- Rewrite binding files only when they are changed
|
||||||
Resolves: #454581
|
Resolves: #454581
|
||||||
|
|
||||||
* Mon Aug 11 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 1.20.4-7
|
* Mon Aug 11 2008 Jason L Tibbitts III <tibbs@math.uh.edu> - 3:1.20.4-7
|
||||||
- Fix license tag.
|
- Fix license tag.
|
||||||
|
|
||||||
* Tue Jun 10 2008 Vitezslav Crhonek <vcrhonek@redhat.com> - 3:1.20.4-6
|
* Tue Jun 10 2008 Vitezslav Crhonek <vcrhonek@redhat.com> - 3:1.20.4-6
|
||||||
|
Loading…
Reference in New Issue
Block a user