system/cronie: Updated for version 1.4.11.

- gunzipping of various support files by rworkman

Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
This commit is contained in:
Chris Abela 2013-10-27 01:12:37 -05:00 committed by Robby Workman
parent e8f1239b6f
commit 12cd740b63
9 changed files with 115 additions and 15 deletions

View file

@ -7,13 +7,11 @@ By default this SlackBuild will include anacron in the package. If you
don't want this, pass ANACRON=no to the SlackBuild.
Note that Slackware has dcron - Dillon's Cron daemon. This package will
conflict with this package. It is advised to remove dcron before installing
conflict with dcron, so it is advised to remove dcron before installing
cronie:
Stop the dcron daemon:
# pgrep crond
# kill <crond_pid>
Remove the dcron package:
Stop the dcron daemon and remove the dcron package:
# kill $(pgrep crond)
# removepkg dcron
# rm -rf /var/spool/cron
@ -21,9 +19,6 @@ Slackware's boot script assumes that you have dcron and thus has to be
modified:
Change this line in /etc/rc.d/rc.M
/usr/sbin/crond -l notice
to:
/usr/sbin/crond

View file

@ -23,7 +23,7 @@
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
PRGNAM=cronie
VERSION=${VERSION:-1.4.9}
VERSION=${VERSION:-1.4.11}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
@ -101,12 +101,13 @@ touch $PKG/etc/cron.deny.new
chmod 600 $PKG/etc/cron.deny.new
# These are copied from Slackware's dcron.SlackBuild
zcat $CWD/run-parts.gz > $PKG/usr/bin/run-parts
cat $CWD/run-parts.8.gz > $PKG/usr/man/man8/run-parts.8.gz
cat $CWD/run-parts > $PKG/usr/bin/run-parts
chmod 0755 $PKG/usr/bin/run-parts
cat $CWD/run-parts.8 > $PKG/usr/man/man8/run-parts.8
mkdir -p $PKG/etc/cron.{hourly,daily,weekly,monthly}
mkdir -p $PKG/var/spool/cron/
chmod 0700 $PKG/var/spool/cron/
zcat $CWD/crontab.root.gz > $PKG/var/spool/cron/root.new
cat $CWD/crontab.root > $PKG/var/spool/cron/root.new
chmod 0600 $PKG/var/spool/cron/root.new
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION

View file

@ -1,8 +1,8 @@
PRGNAM="cronie"
VERSION="1.4.9"
VERSION="1.4.11"
HOMEPAGE="https://fedorahosted.org/cronie/"
DOWNLOAD="https://fedorahosted.org/releases/c/r/cronie/cronie-1.4.9.tar.gz"
MD5SUM="9133195e5e6f824ef460f5ccc533f1b7"
DOWNLOAD="https://fedorahosted.org/releases/c/r/cronie/cronie-1.4.11.tar.gz"
MD5SUM="2ba645cf54de17f138ef70312843862f"
DOWNLOAD_x86_64=""
MD5SUM_x86_64=""
REQUIRES=""

View file

@ -0,0 +1,22 @@
# If you don't want the output of a cron job mailed to you, you have to direct
# any output to /dev/null. We'll do this here since these jobs should run
# properly on a newly installed system. If a script fails, run-parts will
# mail a notice to root.
#
# Run the hourly, daily, weekly, and monthly cron jobs.
# Jobs that need different timing may be entered into the crontab as before,
# but most really don't need greater granularity than this. If the exact
# times of the hourly, daily, weekly, and monthly cron jobs do not suit your
# needs, feel free to adjust them.
#
# Run hourly cron jobs at 47 minutes after the hour:
47 * * * * /usr/bin/run-parts /etc/cron.hourly 1> /dev/null
#
# Run daily cron jobs at 4:40 every day:
40 4 * * * /usr/bin/run-parts /etc/cron.daily 1> /dev/null
#
# Run weekly cron jobs at 4:30 on the first day of the week:
30 4 * * 0 /usr/bin/run-parts /etc/cron.weekly 1> /dev/null
#
# Run monthly cron jobs at 4:20 on the first day of the month:
20 4 1 * * /usr/bin/run-parts /etc/cron.monthly 1> /dev/null

Binary file not shown.

46
system/cronie/run-parts Normal file
View file

@ -0,0 +1,46 @@
#!/bin/sh
# run-parts: Runs all the scripts found in a directory.
# keep going when something fails
set +e
if [ $# -lt 1 ]; then
echo "Usage: run-parts <directory>"
exit 1
fi
if [ ! -d $1 ]; then
echo "Not a directory: $1"
echo "Usage: run-parts <directory>"
exit 1
fi
# There are several types of files that we would like to
# ignore automatically, as they are likely to be backups
# of other scripts:
IGNORE_SUFFIXES="~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp"
# Main loop:
for SCRIPT in $1/* ; do
# If this is not a regular file, skip it:
if [ ! -f $SCRIPT ]; then
continue
fi
# Determine if this file should be skipped by suffix:
SKIP=false
for SUFFIX in $IGNORE_SUFFIXES ; do
if [ ! "$(basename $SCRIPT $SUFFIX)" = "$(basename $SCRIPT)" ]; then
SKIP=true
break
fi
done
if [ "$SKIP" = "true" ]; then
continue
fi
# If we've made it this far, then run the script if it's executable:
if [ -x $SCRIPT ]; then
$SCRIPT || echo "$SCRIPT failed."
fi
done
exit 0

36
system/cronie/run-parts.8 Normal file
View file

@ -0,0 +1,36 @@
.\" -*- nroff -*-
.ds g \" empty
.ds G \" empty
.\" Like TP, but if specified indent is more than half
.\" the current line-length - indent, use the default indent.
.de Tp
.ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP
.el .TP "\\$1"
..
.TH RUN-PARTS 8 "14 Apr 2002" "Slackware Version 8.1.0
.SH NAME
run-parts \- run scripts found in a directory
.SH SYNOPSIS
.B run-parts <directory>
.LP
.SH DESCRIPTION
.B run-parts
is a utility that will run scripts that are found in a directory. For example,
it might be useful to create an /etc/cron.daily directory and put scripts in
there for daily cron jobs. Then
.B run-parts
can be called once a day from root's crontab to run all the scripts found in
/etc/cron.daily:
40 4 * * * run-parts /etc/cron.daily
.B run-parts
automatically skips files with certain suffixes that are generally associated
with backup or extra files. Any file that ends in one of these will be silently
ignored: ~ ^ , .bak .new .rpmsave .rpmorig .rpmnew .swp
.SH AUTHOR
Patrick J. Volkerding <volkerdi@slackware.com>, with ideas borrowed from the
Red Hat and Debian versions of this utility.
.SH "SEE ALSO"
.BR crond(8),
.BR crontab(8).

Binary file not shown.

Binary file not shown.