Project

General

Profile

« Previous | Next » 

Revision 33178d86

Added by Ermal Luçi about 17 years ago

Remove unnecessary copying of dyndns cache file for ez-ipudate program. It is only a cache file after all and i do not think ez-ipupdate is used anymore.

View differences:

etc/inc/services.inc
467 467
		conf_mount_ro();
468 468
	}
469 469

  
470
	if (file_exists("{$g['conf_path']}/ez-ipupdate*.cache")) {
471
		conf_mount_rw();
472
		unlink("{$g['conf_path']}/ez-ipupdate*.cache");
473
		conf_mount_ro();
474
	}
475
	
476
	if (file_exists("{$g['conf_path']}/dyndns*.cache")) {
477
		conf_mount_rw();
478
		unlink("{$g['conf_path']}/dyndns*.cache");
479
		conf_mount_ro();
480
	}
470
	mwexec("rm {$g['varetc_path']}/ez-ipupdate*.cache");
471
	mwexec("rm {$g['varetc_path']}/dyndns*.cache");
481 472

  
482 473
	return 0;
483 474
}
......
550 541
        sigkillbypid("{$g['varrun_path']}/ez-ipupdate_{$if}.pid", "QUIT");
551 542

  
552 543
        $dyndnscfg = $config['dyndnses']['dyndns'];
553
        $wancfg = $config['interfaces']['wan'];
544
        $wancfg = $config['interfaces'][$if];
554 545

  
555 546
                sleep(1);
556 547

  
......
569 560
max-interval=2073600
570 561
pid-file={$g['varrun_path']}/ez-ipupdate_{$if}.pid
571 562
cache-file={$g['vardb_path']}/ez-ipupdate_{$if}.cache
572
execute=/etc/rc.dyndns.storecache {$g['vardb_path']}/ez-ipupdate_{$if}.cache
573 563
daemon
574 564

  
575 565
EOD;
......
595 585
                fwrite($fd, $ezipupdateconf);
596 586
                fclose($fd);
597 587

  
598
                /* if we're booting, copy the cache file from /conf */
599
                if ($g['booting']) {
600
                        if (file_exists("{$g['conf_path']}/ez-ipupdate_{$if}.cache")) {
601
                                copy("{$g['conf_path']}/ez-ipupdate_{$if}.cache", "{$g['vardb_path']}/ez-ipupdate_{$if}.cache");
602
                       }
603
                }
604

  
605 588
                /* run ez-ipupdate */
606 589
                mwexec("/usr/local/bin/ez-ipupdate -c {$g['varetc_path']}/ez-ipupdate_{$if}.conf");
607 590

  

Also available in: Unified diff