rpms/inadyn/FC-3 inadyn.init,NONE,1.1 inadyn.spec,1.2,1.3
Jochen Schmitt (s4504kr)
fedora-extras-commits at redhat.com
Mon May 9 15:23:58 UTC 2005
Author: s4504kr
Update of /cvs/extras/rpms/inadyn/FC-3
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv25402
Modified Files:
inadyn.spec
Added Files:
inadyn.init
Log Message:
Description:
Sync FC-3 with devel.
--- NEW FILE inadyn.init ---
#!/bin/sh
#
# inadyn Starts and stops the inadyn daemon
#
# chkconfig: - 55 45
#
# processname: inadyn
# description: Check and update your IP to dynamic DNS Server.
# pidfile: /var/run/inadyn/inadyn.pid
# config: /etc/inadyn.conf
ina_config=/etc/inadyn.conf
ina_bin=/usr/sbin/inadyn
ina_pid=/var/run/inadyn.pid
# Make sure relevant files exist
[ -x "$ina_bin" -a -s "$ina_config" ] || exit 0
# Source function library.
. /etc/rc.d/init.d/functions
# Source networking configuration.
. /etc/sysconfig/network
# Check that networking is up.
[ "$NETWORKING" = "no" ] && exit 0
RETVAL=0
prog=inadyn
start() {
# Start daemons.
echo -n $"Starting $prog: "
daemon $ina_bin
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
}
stop() {
# Stop daemons.
echo -n $"Shutting down $prog: "
killproc $prog -QUIT
RETVAL=$?
echo
[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog && rm -f $ina_pid
}
restart() {
stop
start
RETVAL=$?
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
condrestart)
[ -e /var/lock/subsys/$prog ] && restart || :
;;
status)
status $prog
;;
*)
echo "Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac
exit $RETVAL
Index: inadyn.spec
===================================================================
RCS file: /cvs/extras/rpms/inadyn/FC-3/inadyn.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- inadyn.spec 13 Apr 2005 20:02:27 -0000 1.2
+++ inadyn.spec 9 May 2005 15:23:56 -0000 1.3
@@ -1,21 +1,32 @@
Name: inadyn
Version: 1.90
-Release: 4
+Release: 11
+
Summary: Dynamic DNS Client
Group: System Environment/Daemons
License: GPL
URL: http://inadyn.ina-tech.net
-Source0: inadyn.v%{version}.zip
+Source0: http://inadyn.ina-tech.net/inadyn.v%{version}.zip
Source1: inadyn.conf
+Source2: inadyn.init
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Requires(post): /sbin/chkconfig
+Requires(post): /sbin/service
+Requires(preun): /sbin/chkconfig
+Requires(preun): /sbin/service
+
%description
INADYN is a dynamic DNS client. It maintains the IP address of a
host name. It periodically checks wheather the IP address stored
by the DSN server is the real current address of the machine that
is running INADYN.
+Before using inadyn for the first time you must use the DynDNS
+provider's web interface to create the entry for the hostname. You
+should then fill in /etc/inadyn.conf with the appropriate detail
+
%prep
%setup -q -c
@@ -36,17 +47,60 @@
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}
install -p -m 0600 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}
+mkdir -p $RPM_BUILD_ROOT%{_initrddir}
+%{__perl} -pe \
+ 's|/var/|%{_localstatedir}/|g ; \
+ s|/usr/sbin/|%{_sbindir}/|g ; \
+ s|/etc/([^ir])|%{_sysconfdir}/$1|g ; \
+ s|/etc/rc\.d/init\.d/|%{_initrddir}/|g' \
+ <%{SOURCE2} >$RPM_BUILD_ROOT%{_initrddir}/inadyn
+
%clean
rm -rf $RPM_BUILD_ROOT
+%post
+/sbin/chkconfig --add inadyn
+
+%preun
+if [ $1 -eq 0 ]; then
+ /sbin/service inadyn stop >/dev/null 2>&1 || :
+ /sbin/chkconfig --del inadyn
+fi
+
+%postun
+if [ $1 -ge 1 ]; then
+ /sbin/service inadyn condrestart >/dev/null
+fi
+
%files
%defattr(-,root,root,-)
%doc readme.html
%{_sbindir}/inadyn
%{_mandir}/man*/*
+%attr(0755,root,root) %{_initrddir}/inadyn
%config %{_sysconfdir}/inadyn.conf
%changelog
+* Tue May 3 2005 Jochen Schmitt <Jochen herr-schmitt de> 1.90-11
+- Move note from README.Fedora to %%description
+
+* Tue May 3 2005 Jochen Schmitt <Jochen herr-schmitt de> 1.90-9
+- And special usage notes
+- Use of /sbin/service to manage initscript in scriptlet
+- Modify initscript, becouse bash don't return PID
+
+* Thu Apr 28 2005 Jochen Schmitt <Jochen herr-schmitt.de> 1.90-8
+- Replace ez_pid to ina_pid in initscript
+
+* Wed Apr 27 2005 Jochen Schmitt <Jochen herr-schmitt de> 1.90-7
+- Enable status in initscript
+
+* Wed Apr 27 2005 Jochen Schmitt <Jochen herr-schmitt de> 1.90-6
+- Add initscript
+
+* Thu Apr 26 2005 Jochen Schmitt <Jochen herr-schmitt de> 1.90-5
+- Add URL to Source0
+
* Thu Apr 12 2005 Jochen Schmitt <Jochen herr-schmitt de> 1.90-4
- Corrected use of percentage sign in changelog
More information about the fedora-extras-commits
mailing list