fix the issue that proxydhcp configuration file cannot be updated

This commit is contained in:
daniceexi 2014-01-10 09:15:50 -05:00
parent a4e0952b6c
commit b58e374758

View File

@ -654,13 +654,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]});
}
}
}