Summary: A cron-like program that can run jobs lost during downtime Summary(pl): Wersja crona z możliwością uruchamiania zapomnianych procesów Name: anacron Version: 2.3 Release: 19 License: GPL Group: Daemons Source0: http://download.sourceforge.net/anacron/%{name}-%{version}.tar.gz Source1: %{name}tab Source2: %{name}.init Patch0: %{name}-SIGTERM.patch URL: http://anacron.sourceforge.net/ Requires: /bin/sh Prereq: /sbin/chkconfig BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) %description Anacron (like `anac(h)ronistic') is a periodic command scheduler. It executes commands at intervals specified in days. Unlike cron, it does not assume that the system is running continuously. It can therefore be used to control the execution of daily, weekly and monthly jobs (or anything with a period of n days), on systems that don't run 24 hours a day. When installed and configured properly, Anacron will make sure that the commands are run at the specified intervals as closely as machine-uptime permits. This package is pre-configured to execute the daily jobs of the PLD Linux system. You should install this program if your system isn't powered on 24 hours a day to make sure the maintenance jobs of other Red Hat Linux packages are executed each day. %description -l pl Anacron (od ,,anac(h)ronistic'') zajmuje się okresowym wykonywaniem poleceń. Wykonuje je w odstępachę będących wielokrotnością dni. W przeciwieństwie do crona nie zakłada, że system działa 24 godziny na dobę. Dzięki temu może być używany do wykonywania codziennych, cotygodniowych i comiesięcznych (lub innych powtarzających się co ileś dni) zadań w systemach, które nie są włączone non-stop. Zainstalowany i poprawnie skonfigurowany Anacron zapewni wykonywanie zleconych zadań tak blisko wyznaczonych terminów, jak tylko możliwe. Ten pakiet został wstępnie skonfigurowany do działania w systemie PLD Linux. Powinieneś zainstalować ten program na systemach, które nie są włączone non-stop aby zapewnić uruchamianie różnych zadań utrzymujących system we właściwych odstępach czasu. %prep %setup -q %patch0 -p1 %build %{__make} CFLAGS="%{rpmcflags}" %install rm -rf $RPM_BUILD_ROOT install -d $RPM_BUILD_ROOT{%{_sysconfdir},%{_sbindir},%{_mandir}/man{5,8}} \ $RPM_BUILD_ROOT/{var/spool/anacron,etc/rc.d/init.d} install anacron $RPM_BUILD_ROOT%{_sbindir} install anacron.8 $RPM_BUILD_ROOT%{_mandir}/man8/ install anacrontab.5 $RPM_BUILD_ROOT%{_mandir}/man5/ install %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir} install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name} for i in cron.daily cron.weekly cron.monthly; do install -d $RPM_BUILD_ROOT%{_sysconfdir}/$i/ cat << EOF > $RPM_BUILD_ROOT%{_sysconfdir}/$i/0anacron #!/bin/sh # # anacron's cron script # # This script updates anacron time stamps. It is called through run-parts # either by anacron itself or by cron. # # The script is called "0anacron" to assure that it will be executed # _before_ all other scripts. anacron -u $i EOF done gzip -9nf ChangeLog README TODO %clean rm -rf $RPM_BUILD_ROOT %post /sbin/chkconfig --add anacron if [ -f /var/lock/subsys/anacron ]; then /etc/rc.d/init.d/anacron restart >&2 else echo "Run \"/etc/rc.d/init.d/anacron start\" to start Anacron daemon." fi %preun if [ "$1" = "0" ];then if [ -f /var/lock/subsys/anacron ]; then /etc/rc.d/init.d/anacron stop >&2 fi /sbin/chkconfig --del anacron fi %files %defattr(644,root,root,755) %doc ChangeLog* README* TODO* %attr(755,root,root) %{_sbindir}/anacron %attr(754,root,root) /etc/rc.d/init.d/* %config %{_sysconfdir}/anacrontab %dir /var/spool/anacron/ %config %{_sysconfdir}/cron.daily/0anacron %config %{_sysconfdir}/cron.monthly/0anacron %config %{_sysconfdir}/cron.weekly/0anacron %{_mandir}/man[58]/*