private bool CopyCommand(string pxeType, string mode, string sArch, string dArch, string sName, string dName)
{
var destinationRootPath = Settings.TftpPath;
if (mode == "proxy" || (pxeType == "grub" && dArch == "efi64") || (pxeType == "winpe" && dArch == "efi64") || (pxeType == "winpe" && dArch == "efi32") || pxeType == "winpe" && dArch == "bios")
destinationRootPath += "proxy" + Path.DirectorySeparatorChar;
try
{
File.Copy(
_sourceRootPath + pxeType + Path.DirectorySeparatorChar + mode +
Path.DirectorySeparatorChar + sArch + Path.DirectorySeparatorChar + sName,
destinationRootPath + dArch + Path.DirectorySeparatorChar + dName, true);
new FileOps().SetUnixPermissions(destinationRootPath + dArch + Path.DirectorySeparatorChar + dName);
}
catch (Exception ex)
{
Logger.Log(ex.Message);
return false;
}
return true;
}