Changeset 37243


Ignore:
Timestamp:
2013-07-11T19:00:30+02:00 (5 years ago)
Author:
blogic
Message:

busybox: convert crond init script to procd

Signed-off-by: John Crispin <blogic@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/utils/busybox/files/cron

    r37007 r37243  
    44START=50 
    55 
    6 SERVICE_USE_PID=1 
     6USE_PROCD=1 
     7PROG=/usr/sbin/crond 
     8NAME=crond 
    79 
    8 start () { 
     10start_service () { 
     11        [ -z "$(ls /etc/crontabs/)" ] && return 1 
     12 
    913        loglevel=$(uci_get "system.@system[0].cronloglevel") 
    10         [ -z "$(ls /etc/crontabs/)" ] && exit 1 
    1114        mkdir -p /var/spool/cron 
    1215        ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null 
    13         service_start /usr/sbin/crond -c /etc/crontabs -l ${loglevel:-5} 
     16 
     17        procd_open_instance 
     18        procd_set_param command "$PROG" -f -c /etc/crontabs -l ${loglevel:-5} 
     19        procd_close_instance 
    1420} 
    15  
    16 stop() { 
    17         service_stop /usr/sbin/crond 
    18 } 
Note: See TracChangeset for help on using the changeset viewer.