Changeset 12247
- Timestamp:
- 06/02/09 07:34:51 (4 years ago)
- File:
-
- 1 edited
-
src/router/services/services/services.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/router/services/services/services.c
r12235 r12247 313 313 int ret = 0; 314 314 struct stat buf; 315 FILE *fp; 315 316 316 317 if (nvram_match("cron_enable", "0")) … … 328 329 buf_to_file("/tmp/cron.d/check_ps", 329 330 "*/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")) { 333 336 334 337 fp = fopen("/tmp/cron.d/pppoe_reconnect", "w"); … … 344 347 if (nvram_match("schedule_enable", "1") 345 348 && nvram_match("schedule_hour_time", "2")) { 346 FILE *fp;347 349 348 350 fp = fopen("/tmp/cron.d/check_schedules", "w"); … … 355 357 356 358 /* 357 * Additional options359 * Additional cron jobs 358 360 */ 359 int i = 0;360 361 361 unlink("/tmp/cron.d/cron_jobs"); 362 362 363 363 if (nvram_invmatch("cron_jobs", "")) { 364 FILE *fp;365 364 366 365 fp = fopen("/tmp/cron.d/cron_jobs", "w"); 367 368 366 fwritenvram("cron_jobs", fp); 369 370 367 fprintf(fp, "\n"); // extra new line at the end 371 372 368 fclose(fp); 373 369 }
Note: See TracChangeset
for help on using the changeset viewer.
