fix: more cleaning up for FreeBSD

This commit is contained in:
Andrew Rioux
2024-09-19 02:42:32 -04:00
parent f6428b92fe
commit 1dfd7e0499
12 changed files with 58 additions and 29 deletions

View File

@@ -10,6 +10,7 @@ pub fn print_capabilities(capabilities: &Capabilities, ip: &IpAddr) {
"\tOperating system: \t{}",
match &capabilities.operating_system {
OperatingSystem::Linux => "Linux",
OperatingSystem::FreeBSD => "FreeBSD",
OperatingSystem::Windows => "Windows",
}
);
@@ -57,7 +58,7 @@ pub fn print_capabilities(capabilities: &Capabilities, ip: &IpAddr) {
}
);
}
OperatingSystem::Windows => {
OperatingSystem::Windows | OperatingSystem::FreeBSD => {
println!(
"\tAdmin user: \t\t{}",
match capabilities.root {

View File

@@ -26,6 +26,7 @@ impl std::str::FromStr for TargetOs {
fn from_str(input: &str) -> Result<Self, Self::Err> {
match input {
"linux" => Ok(Self::Linux),
"freebsd" => Ok(Self::FreeBSD),
"windows" => Ok(Self::Windows),
"windows-service" => Ok(Self::WindowsService),
_ => Err("could not parse target operating system"),