rpms/rinetd/devel rinetd.conf, NONE, 1.1 rinetd.init, NONE, 1.1 rinetd.logrotate, NONE, 1.1 rinetd.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Chris Ricker (kaboom) fedora-extras-commits at redhat.com
Thu Jun 30 18:09:45 UTC 2005


Author: kaboom

Update of /cvs/extras/rpms/rinetd/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv17165/devel

Modified Files:
	.cvsignore sources 
Added Files:
	rinetd.conf rinetd.init rinetd.logrotate rinetd.spec 
Log Message:
auto-import rinetd-0.62-4 on branch devel from rinetd-0.62-4.src.rpm


--- NEW FILE rinetd.conf ---
# example configuration file for rinetd
#
#

# to forward connections to port 80 on 10.10.10.2 to port 80 on 192.168.0.2
#  10.10.10.2 80 192.168.0.2 80

# to forward connections to port 80 on all addresses to port 80 on 192.168.0.2
# 0.0.0.0 80 192.168.0.2 80

# access controls can be set with allow and deny rules
# allow and deny before the first forwarding rule are global
# allow and deny after a specific rule apply to it only

# this rule allows hosts from 172.16.32.0/24 netblock
# allow 172.16.32.*

# this rule denies the host 192.168.32.12
# deny 192.168.32.12

# rinetd supports logging - to enable, uncomment the following
# logfile /var/log/rinetd.log

# by default, logs are in a tab-delimited format. Web common-log format
# is available by uncommenting the following
# logcommon


--- NEW FILE rinetd.init ---
#!/bin/sh
#
# rinetd A TCP redirection server
#
# chkconfig: - 80 20
# description: rinetd is a TCP redirection server
# processname: rinetd
# config: /etc/rinetd.conf

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0

exec="/usr/sbin/rinetd"
prog=$(basename $exec)

lockfile=/var/lock/subsys/$prog

start() {
    echo -n $"Starting $prog: "
	daemon $exec
    retval=$?
    echo
    [ $retval -eq 0 ] && touch $lockfile
    return $retval
}

stop() {
    echo -n $"Stopping $prog: "
    killproc $prog
    retval=$?
    echo
    [ $retval -eq 0 ] && rm -f $lockfile
    return $retval
}

restart() {
    stop
    start
}

reload() {
	if [ -f "$lockfile" ]; then
		echo -n $"Reloading $prog: "
		killproc $prog -HUP
		retval=$?
		echo
		return $retval
	else
		restart
	fi
}

force_reload() {
    restart
}

fdr_status() {
    status $prog
}

case "$1" in
    start|stop|restart|reload)
        $1
        ;;
    force-reload)
        force_reload
        ;;
    status)
        fdr_status
        ;;
    condrestart|try-restart)
  	[ ! -f $lockfile ] || restart
	;;
    *)
        echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
        exit 2
esac


--- NEW FILE rinetd.logrotate ---
/var/log/rinetd.log {
	missingok
	notifempty
	delaycompress
	postrotate
		/sbin/service rinetd restart 2> /dev/null > /dev/null || true
	endscript
}


--- NEW FILE rinetd.spec ---
Summary: TCP redirection server
Name: rinetd
Version: 0.62
Release: 4
License: GPL
Group: System Environment/Daemons
URL: http://www.boutell.com/rinetd
Source0: http://www.boutell.com/rinetd/http/rinetd.tar.gz 
Source1: rinetd.conf
Source2: rinetd.init
Source3: rinetd.logrotate
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
PreReq: /sbin/chkconfig
PreReq: /sbin/service

%description
rinetd is a daemon which redirects TCP connections from one IP address
and port to another IP address and port. This daemon is often used to
access services behind a firewall.

%prep
%setup -q -n %{name}

%build
make CFLAGS="$RPM_OPT_FLAGS" %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT

mkdir -p $RPM_BUILD_ROOT%{_sbindir}
install -p -m 0755 rinetd $RPM_BUILD_ROOT%{_sbindir}

mkdir -p $RPM_BUILD_ROOT%{_mandir}/man8
install -p -m 0644 rinetd.8 $RPM_BUILD_ROOT%{_mandir}/man8

mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d
install -p -m 0644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
install -p -m 0755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/rinetd
install -p -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/rinetd

%clean
rm -rf $RPM_BUILD_ROOT

%post
/sbin/chkconfig --add rinetd

%preun
if [ "$1" -eq 0 ]; then
	/sbin/service rinetd stop > /dev/null 2>&1 ||:
	/sbin/chkconfig --del rinetd
fi
						
%postun
if [ "$1" -ge 1 ]; then
	/sbin/service rinetd condrestart > /dev/null 2>&1 ||:
fi

%files
%defattr(-, root, root)
%doc CHANGES README index.html
%{_sbindir}/*
%{_mandir}/man8/*
%config(noreplace) %{_sysconfdir}/rinetd.conf
%config %{_sysconfdir}/rc.d/init.d/rinetd
%config(noreplace) %{_sysconfdir}/logrotate.d/rinetd

%changelog
* Thu Jun 30 2005 Chris Ricker <kaboom at oobleck.net> 0.62-4
- use SIGHUP for reload in init script (Ville Skyttä)
- example config file made mode 0644 (Ville Skyttä)

* Fri Jun 02 2005 Chris Ricker <kaboom at oobleck.net> 0.62-3
- Fix %%preun script
- install instead of cp and %%attr (Ville Skyttä)

* Thu Apr 28 2005 Chris Ricker <kaboom at oobleck.net> 0.62-2
- Really include the logrotate file this time

* Tue Apr 26 2005 Chris Ricker <kaboom at oobleck.net> 0.62-1
- Initial package


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/rinetd/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	30 Jun 2005 18:09:17 -0000	1.1
+++ .cvsignore	30 Jun 2005 18:09:43 -0000	1.2
@@ -0,0 +1 @@
+rinetd.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/rinetd/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	30 Jun 2005 18:09:17 -0000	1.1
+++ sources	30 Jun 2005 18:09:43 -0000	1.2
@@ -0,0 +1 @@
+28c78bac648971724c46f1a921154c4f  rinetd.tar.gz




More information about the fedora-extras-commits mailing list