summaryrefslogtreecommitdiffstats
path: root/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie
diff options
context:
space:
mode:
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-extended/cronie/cronie')
-rwxr-xr-ximport-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crond.init58
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crond.service11
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crond_pam_config.patch19
-rw-r--r--import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crontab14
4 files changed, 102 insertions, 0 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crond.init b/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crond.init
new file mode 100755
index 000000000..53b8514ca
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crond.init
@@ -0,0 +1,58 @@
+#!/bin/sh
+### BEGIN INIT INFO
+# Provides: crond crontab
+# Default-Start: 2345
+# Default-Stop: 016
+# Short-Description: run cron daemon
+# Description: cron is a standard UNIX program that runs user-specified
+# programs at periodic scheduled times. vixie cron adds a
+# number of features to the basic UNIX cron, including better
+# security and more powerful configuration options.
+### END INIT INFO
+
+CROND=/usr/sbin/crond
+CONFIG=/etc/sysconfig/crond
+
+[ -f $CONFIG ] || exit 1
+[ -x $CROND ] || exit 1
+
+. $CONFIG
+
+# Source function library.
+. /etc/init.d/functions
+
+case "$1" in
+ start)
+ echo -n "Starting crond: "
+ start-stop-daemon --start --quiet --exec $CROND -- $CRONDARGS
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ] ; then
+ echo "OK"
+ else
+ echo "FAIL"
+ fi
+ ;;
+ stop)
+ echo -n "Stopping crond: "
+ start-stop-daemon --stop --quiet --pidfile /var/run/crond.pid
+ RETVAL=$?
+ if [ $RETVAL -eq 0 ] ; then
+ echo "OK"
+ else
+ echo "FAIL"
+ fi
+ ;;
+ status)
+ status crond
+ exit $?
+ ;;
+ restart)
+ $0 stop && sleep 1 && $0 start
+ ;;
+ *)
+ echo "Usage: /etc/init.d/crond {start|stop|status|restart}"
+ exit 1
+esac
+
+exit 0
+
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crond.service b/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crond.service
new file mode 100644
index 000000000..d435a6eb3
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crond.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Periodic Command Scheduler
+
+[Service]
+EnvironmentFile=/etc/sysconfig/crond
+ExecStart=@SBINDIR@/crond -n $CRONDARGS
+ExecReload=@BASE_BINDIR@/kill -HUP $MAINPID
+Restart=always
+
+[Install]
+WantedBy=multi-user.target
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crond_pam_config.patch b/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crond_pam_config.patch
new file mode 100644
index 000000000..675872c3c
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crond_pam_config.patch
@@ -0,0 +1,19 @@
+password-auth is the Fedora's common pam configure file, use oe common pam
+configure files instead.
+
+Upstream-Status: Pending
+
+Signed-off-by: Wenzong Fan <wenzong.fan@windriver.com>
+--- cronie-1.4.7/pam/crond.orig 2010-12-16 16:59:02.000000000 +0800
++++ cronie-1.4.7/pam/crond 2011-07-20 09:47:16.080819203 +0800
+@@ -4,7 +4,7 @@
+ #
+ # No PAM authentication called, auth modules not needed
+ account required pam_access.so
+-account include password-auth
++account include common-account
+ session required pam_loginuid.so
+-session include password-auth
+-auth include password-auth
++session include common-session-noninteractive
++auth include common-auth
diff --git a/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crontab b/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crontab
new file mode 100644
index 000000000..22c4feb2d
--- /dev/null
+++ b/import-layers/yocto-poky/meta/recipes-extended/cronie/cronie/crontab
@@ -0,0 +1,14 @@
+# /etc/crontab: system-wide crontab
+# Unlike any other crontab you don't have to run the `crontab'
+# command to install the new version when you edit this file
+# and files in /etc/cron.d. These files also have username fields,
+# that none of the other crontabs do.
+
+SHELL=/bin/sh
+PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
+
+# m h dom mon dow user command
+# 1 * * * * root cd / && run-parts /etc/cron.hourly
+# 30 7 * * * root cd / && run-parts /etc/cron.daily
+# 42 7 * * 7 root cd / && run-parts /etc/cron.weekly
+# 55 7 1 * * root cd / && run-parts /etc/cron.monthly
OpenPOWER on IntegriCloud