]> granicus.if.org Git - cronie/commitdiff
Add configuration scripts into contrib.
authorMarcela Mašláňová <mmaslano@redhat.com>
Thu, 16 Jul 2009 08:02:01 +0000 (10:02 +0200)
committerMarcela Mašláňová <mmaslano@redhat.com>
Thu, 16 Jul 2009 08:02:01 +0000 (10:02 +0200)
Cleaning/adding man pages into Makefile/directories.

.gitignore
Makefile.am
contrib/0anacron [new file with mode: 0644]
contrib/0hourly [new file with mode: 0644]
contrib/regularly-jobs [moved from regularly-jobs with 100% similarity]
man/Makefile.am
man/anacron.8 [moved from anacron/anacron.8 with 100% similarity]
man/anacrontab.5 [moved from anacron/anacrontab.5 with 100% similarity]

index 09f00bdc4fb5f433cef0bdf8a8575e0dc03471e5..a5e7af3ac709f709eab3c1f3b5af2908a90f2160 100644 (file)
@@ -1,5 +1,7 @@
 Makefile.in
 Makefile
+anacron/Makefile
+anacron/Makefile.in
 aclocal.m4
 autom4te.cache
 config.guess
@@ -11,6 +13,8 @@ config.sub
 configure
 depcomp
 install-sh
+man/Makefile
+man/Makefile.in
 missing
 stamp-h1
 .deps
index e7199a3cdf3f39996a1cd13f2637e06266cc776a..55b2ebf4e4735839104dc3a821684fbcccebf6ee 100644 (file)
@@ -9,5 +9,6 @@ endif
 
 #init_SCRIPTS = cronie.init
 
-EXTRA_DIST = cronie.init crond.sysconfig regularly-jobs
+EXTRA_DIST = cronie.init crond.sysconfig contrib/regularly-jobs \
+                contrib/0anacron contrib/0hourly
 
diff --git a/contrib/0anacron b/contrib/0anacron
new file mode 100644 (file)
index 0000000..7d48cf9
--- /dev/null
@@ -0,0 +1,18 @@
+#!/bin/bash
+#in case file doesn't exist 
+if test -x /var/spool/anacron/cron.daily; then
+    day=`cat /var/spool/anacron/cron.daily`
+fi
+if [ `date +%Y%m%d` = "$day" ]; then
+    exit 0;
+fi
+
+# in case anacron is already running,
+# there will be log (daemon won't be running twice).
+if test -x /usr/bin/on_ac_power; then
+    /usr/bin/on_ac_power &> /dev/null
+    if test $? -eq 1; then
+    exit 0
+    fi
+fi
+/usr/sbin/anacron -s
diff --git a/contrib/0hourly b/contrib/0hourly
new file mode 100644 (file)
index 0000000..e4a63dc
--- /dev/null
@@ -0,0 +1,5 @@
+SHELL=/bin/bash
+PATH=/sbin:/bin:/usr/sbin:/usr/bin
+MAILTO=root
+HOME=/
+01 * * * * root run-parts /etc/cron.hourly
similarity index 100%
rename from regularly-jobs
rename to contrib/regularly-jobs
index 12aa3880d0c2567f6e1c9b2ee0988dfbc5005a46..a16a9794af749072d43f4c47e24444076ea34deb 100644 (file)
@@ -1,3 +1,3 @@
-dist_man_MANS = crontab.1 crontab.5 cron.8 crond.8
+dist_man_MANS = crontab.1 crontab.5 cron.8 crond.8 anacrontab.5 anacron.8
 noinst_MANS = bitstring.3
 
similarity index 100%
rename from anacron/anacron.8
rename to man/anacron.8
similarity index 100%
rename from anacron/anacrontab.5
rename to man/anacrontab.5