- fixes #670380 - added /etc/sysconfig/rdisc, modified initscript
- initscript moved to git
This commit is contained in:
parent
3b540d0346
commit
86a5c32b78
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,6 +1,4 @@
|
||||
iputils-s20100418.tar.bz2
|
||||
rdisc.initd
|
||||
ifenslave.tar.gz
|
||||
/iputils-s20101006.tar.bz2
|
||||
/ifenslave.tar.gz
|
||||
/rdisc.initd
|
||||
|
10
iputils.spec
10
iputils.spec
@ -1,7 +1,7 @@
|
||||
Summary: Network monitoring tools including ping
|
||||
Name: iputils
|
||||
Version: 20101006
|
||||
Release: 4%{?dist}
|
||||
Release: 5%{?dist}
|
||||
License: BSD
|
||||
URL: http://www.skbuff.net/iputils
|
||||
Group: System Environment/Daemons
|
||||
@ -10,6 +10,7 @@ Source0: http://www.skbuff.net/iputils/%{name}-s%{version}.tar.bz2
|
||||
Source1: ifenslave.tar.gz
|
||||
Source3: rdisc.initd
|
||||
Source4: rdisc.service
|
||||
Source5: rdisc.sysconfig
|
||||
|
||||
Patch0: iputils-20020927-rh.patch
|
||||
Patch1: iputils-20020124-countermeasures.patch
|
||||
@ -84,6 +85,7 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
mkdir -p ${RPM_BUILD_ROOT}%{_sbindir}
|
||||
mkdir -p ${RPM_BUILD_ROOT}/{bin,sbin}
|
||||
mkdir -p $RPM_BUILD_ROOT/lib/systemd/system
|
||||
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
|
||||
|
||||
install -c clockdiff ${RPM_BUILD_ROOT}%{_sbindir}/
|
||||
install -cp arping ${RPM_BUILD_ROOT}/sbin/
|
||||
@ -112,6 +114,7 @@ ln -s tracepath.8.gz ${RPM_BUILD_ROOT}%{_mandir}/man8/tracepath6.8.gz
|
||||
|
||||
install -dp ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d
|
||||
install -m 755 -p %SOURCE3 ${RPM_BUILD_ROOT}%{_sysconfdir}/rc.d/init.d/rdisc
|
||||
install -m 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/rdisc
|
||||
install -m 644 %SOURCE4 ${RPM_BUILD_ROOT}/lib/systemd/system
|
||||
|
||||
iconv -f ISO88591 -t UTF8 RELNOTES -o RELNOTES.tmp
|
||||
@ -164,8 +167,13 @@ rm -rf ${RPM_BUILD_ROOT}
|
||||
%{_sbindir}/tracepath6
|
||||
%attr(644,root,root) %{_mandir}/man8/*
|
||||
%{_sysconfdir}/rc.d/init.d/rdisc
|
||||
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/sysconfig/rdisc
|
||||
|
||||
%changelog
|
||||
* Wed Jan 19 2011 Jiri Skala <jskala@redhat.com> - 20101006-5
|
||||
- fixes #670380 - added /etc/sysconfig/rdisc, modified initscript
|
||||
- initscript moved to git
|
||||
|
||||
* Wed Dec 15 2010 Jiri Skala <jskala@redhat.com> - 20101006-4
|
||||
- fixes #662720 - Providing native systemd file
|
||||
- freeing memory when capabilities are dropped
|
||||
|
87
rdisc.initd
Normal file
87
rdisc.initd
Normal file
@ -0,0 +1,87 @@
|
||||
#!/bin/bash
|
||||
#
|
||||
# $Id: rdisc,v 1.5 2005/04/05 10:06:01 bastian Exp $
|
||||
#
|
||||
### BEGIN INIT INFO
|
||||
# Provides: rdisc
|
||||
# Short-Description: This is a daemon which discovers routers on the local subnet.
|
||||
# Description: This is a daemon which discovers routers on the local subnet.
|
||||
### END INIT INFO
|
||||
|
||||
# chkconfig: - 41 89
|
||||
# config: /etc/sysconfig/rdisc
|
||||
|
||||
# Source function library.
|
||||
. /etc/init.d/functions
|
||||
. /etc/sysconfig/network
|
||||
|
||||
LOCKFILE=/var/lock/subsys/rdisc
|
||||
|
||||
# Set default options in /etc/sysconfig/rdisc
|
||||
[ -f /etc/sysconfig/rdisc ] && . /etc/sysconfig/rdisc
|
||||
RDISCOPTS=${RDISCOPTS:-"-s"}
|
||||
|
||||
start() {
|
||||
# Check that networking is configured.
|
||||
[ ${NETWORKING} = "no" ] && exit 1
|
||||
|
||||
echo -n $"Starting router discovery: "
|
||||
if [ $UID -ne 0 ]; then
|
||||
RETVAL=4
|
||||
failure
|
||||
else
|
||||
daemon /sbin/rdisc $RDISCOPTS
|
||||
RETVAL=$?
|
||||
[ $RETVAL -eq 0 ] && touch $LOCKFILE
|
||||
fi;
|
||||
echo
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n $"Shutting down router discovery services: "
|
||||
if [ $UID -ne 0 ]; then
|
||||
RETVAL=4
|
||||
failure
|
||||
else
|
||||
killproc /sbin/rdisc
|
||||
RETVAL=$?
|
||||
[ $RETVAL -eq 0 ] && rm -f $LOCKFILE
|
||||
fi;
|
||||
echo
|
||||
return $RETVAL
|
||||
}
|
||||
|
||||
restart() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
RETVAL=0
|
||||
|
||||
# See how we were called.
|
||||
case "$1" in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
status)
|
||||
status rdisc
|
||||
;;
|
||||
restart|reload)
|
||||
restart
|
||||
;;
|
||||
condrestart)
|
||||
if status $prog > /dev/null; then
|
||||
stop
|
||||
start
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo $"Usage: $0 {start|stop|status|restart|reload}"
|
||||
exit 2
|
||||
esac
|
||||
|
||||
exit $?
|
1
rdisc.sysconfig
Normal file
1
rdisc.sysconfig
Normal file
@ -0,0 +1 @@
|
||||
RDISCOPTS="-s"
|
Loading…
Reference in New Issue
Block a user