[Zrouter-src] ZRouter.org: push to ZRouter profiles/SMALL_/files/etc/rc.d/cron
zrouter-src at zrouter.org
zrouter-src at zrouter.org
Thu Sep 20 12:54:13 UTC 2012
details: http://zrouter.org/hg/zrouter//rev/a0f75c3d2ca5
changeset: 444:a0f75c3d2ca5
user: Aleksandr Rybalko <ray at ddteam.net>
date: Thu Sep 20 15:35:32 2012 +0300
description:
Create dirs before cron will start.
diffstat:
profiles/SMALL_/files/etc/rc.d/cron | 31 +++++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diffs (35 lines):
diff -r eddcdc561685 -r a0f75c3d2ca5 profiles/SMALL_/files/etc/rc.d/cron
--- /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"
More information about the Zrouter-src
mailing list