Changeset 12247


Ignore:
Timestamp:
06/02/09 07:34:51 (4 years ago)
Author:
eko
Message:

try this cron startup fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/router/services/services/services.c

    r12235 r12247  
    313313        int ret = 0; 
    314314        struct stat buf; 
     315        FILE *fp; 
    315316 
    316317        if (nvram_match("cron_enable", "0")) 
     
    328329        buf_to_file("/tmp/cron.d/check_ps", 
    329330                    "*/2 * * * * root /sbin/check_ps\n"); 
    330         if (nvram_match("reconnect_enable", "1"))       // pppoe reconnect 
    331         { 
    332                 FILE *fp; 
     331        /* 
     332         * pppoe reconnect  
     333         */ 
     334        unlink("/tmp/cron.d/pppoe_reconnect");    
     335        if (nvram_match("reconnect_enable", "1")) { 
    333336 
    334337                fp = fopen("/tmp/cron.d/pppoe_reconnect", "w"); 
     
    344347        if (nvram_match("schedule_enable", "1") 
    345348            && nvram_match("schedule_hour_time", "2")) { 
    346                 FILE *fp; 
    347349 
    348350                fp = fopen("/tmp/cron.d/check_schedules", "w"); 
     
    355357 
    356358        /* 
    357          * Additional options  
     359         * Additional cron jobs  
    358360         */ 
    359         int i = 0; 
    360  
    361361        unlink("/tmp/cron.d/cron_jobs"); 
    362362 
    363363        if (nvram_invmatch("cron_jobs", "")) { 
    364                 FILE *fp; 
    365364 
    366365                fp = fopen("/tmp/cron.d/cron_jobs", "w"); 
    367  
    368366                fwritenvram("cron_jobs", fp); 
    369  
    370367                fprintf(fp, "\n");      // extra new line at the end 
    371  
    372368                fclose(fp); 
    373369        } 
Note: See TracChangeset for help on using the changeset viewer.