mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 05:12:30 +00:00 
			
		
		
		
	fix the issue that proxydhcp configuration file cannot be updated
This commit is contained in:
		@@ -648,13 +648,18 @@ sub mkinstall
 | 
			
		||||
 | 
			
		||||
    # generate the winpe path configuration file for proxydhcp daemon
 | 
			
		||||
    if ($dowinpecfg) {
 | 
			
		||||
        open (FILE, ">/var/lib/xcat/proxydhcp.cfg");
 | 
			
		||||
        print FILE $winpepathcfg;
 | 
			
		||||
        close (FILE);
 | 
			
		||||
 | 
			
		||||
        if (open (PDPID, "</var/run/xcat/proxydhcp-xcat.pid")) {
 | 
			
		||||
            my $pdpid = <PDPID>;
 | 
			
		||||
            kill 10, $pdpid;
 | 
			
		||||
        unless (-d "/var/lib/xcat/") {
 | 
			
		||||
            mkpath "/var/lib/xcat/";
 | 
			
		||||
        }
 | 
			
		||||
        if (open (FILE, ">/var/lib/xcat/proxydhcp.cfg")) {
 | 
			
		||||
            print FILE $winpepathcfg;
 | 
			
		||||
            close (FILE);
 | 
			
		||||
            if (open (PDPID, "</var/run/xcat/proxydhcp-xcat.pid")) {
 | 
			
		||||
                my $pdpid = <PDPID>;
 | 
			
		||||
                kill 10, $pdpid;
 | 
			
		||||
            }
 | 
			
		||||
        } else {
 | 
			
		||||
            $callback->({error=>["Cannot open /var/lib/xcat/proxydhcp.cfg for update."],errorcode=>[1]});
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user