private async Task EnsureRemoteDirectoryExists() { bool verbose = m_buildSettingsProvider.Verbose; if (verbose) { await m_outputWriter.WriteLineAsync("Creating Code Deploy Directory").ConfigureAwait(false); } // Ensure output directory exists await m_fileDeployerProvider.RunCommandAsync($"mkdir -p {DeployProperties.DeployDir}", ConnectionUser.LvUser).ConfigureAwait(false); }
public virtual async Task InstallRuntimeAsync(string location) { await m_outputWriter.WriteLineAsync("Installing Mono Runtime").ConfigureAwait(false); if (!await m_md5HashCheckerProvider.VerifyMd5Hash(location, MonoMd5).ConfigureAwait(false)) { throw m_exceptionThrowerProvider.ThrowException("Mono file could not be verified. Please redownload and try again"); } await m_remotePackageInstallerProvider.InstallZippedPackagesAsync(location).ConfigureAwait(false); await VerifyRuntimeAsync().ConfigureAwait(false); var command = await m_fileDeployerProvider.RunCommandAsync("setcap cap_sys_nice=pe /usr/bin/mono-sgen", ConnectionUser.Admin).ConfigureAwait(false); if (command == null || command.ExitStatus != 0) { throw m_exceptionThrowerProvider.ThrowException("Failed to set RealTime capabilities on Mono"); } await m_outputWriter.WriteLineAsync("Successfully installed Mono Runtime").ConfigureAwait(false); }
public async Task <string> GetCurrentRoboRioImageAsync() { var result = await m_fileDeployerProvider.RunCommandAsync("grep IMAGEVERSION /etc/natinst/share/scs_imagemetadata.ini", ConnectionUser.LvUser).ConfigureAwait(false); var image = result.Result; var start = image.IndexOf("FRC_roboRIO"); if (start < 0) { return(""); } image = image.Substring(start); image = image.Substring(0, image.IndexOf('\"')); return(image); }