changeset 444:a0f75c3d2ca5

Create dirs before cron will start.
author Aleksandr Rybalko <ray@ddteam.net>
date Thu, 20 Sep 2012 15:35:32 +0300
parents eddcdc561685
children f23518f7c7dc
files profiles/SMALL_/files/etc/rc.d/cron
diffstat 1 files changed, 31 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/profiles/SMALL_/files/etc/rc.d/cron	Thu Sep 20 15:35:32 2012 +0300
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: cron
+# REQUIRE: MAIN
+# KEYWORD: shutdown
+
+. /etc/rc.subr
+
+name="cron"
+rcvar="cron_enable"
+command="/usr/sbin/${name}"
+pidfile="/var/run/${name}.pid"
+start_precmd="cron_precmd"
+
+load_rc_config $name
+if checkyesno cron_dst
+then
+	cron_flags="$cron_flags -s"
+fi
+
+cron_precmd()
+{
+	if [ ! -d /var/cron ] ; then
+	    mkdir -p /var/cron
+	fi
+}
+
+run_rc_command "$1"