1 #!/bin/sh /etc/rc.common
2 # Copyright (C) 2008 x-wrt.org
11 append CRONTABS_cfg "$cfg_name"
19 echo "# WARNING: this is an auto generated file, please use uci to set cron entries" > /etc/crontabs/root
20 echo "# this file is generated from /etc/config/crontabs" >> /etc/crontabs/root
21 echo >> /etc/crontabs/root
23 for crontab in $CRONTABS_cfg; do
24 config_get MINUTES $crontab minutes
25 config_get HOURS $crontab hours
26 config_get DAYS $crontab days
27 config_get MONTHS $crontab months
28 config_get WEEKDAYS $crontab weekdays
29 config_get COMMAND $crontab command
30 config_get ENABLED $crontab enabled
32 if [ "$MINUTES" != "" ] && [ "$HOURS" != "" ] && [ "$DAYS" != "" ] && [ "$MONTHS" != "" ] && [ "$WEEKDAYS" != "" ] && [ "$COMMAND" != "" ] && [ "$ENABLED" = "1" ]; then
33 echo $MINUTES" "$HOURS" "$DAYS" "$MONTHS" "$WEEKDAYS" "$COMMAND >> /etc/crontabs/root