[exec] add support for *BSD OSes (#10021)

Signed-off-by: Juergen Weber <weberjn@gmail.com>
pull/10044/head
Jürgen Weber 2021-02-03 10:44:44 +01:00 committed by GitHub
parent c1cec8e11e
commit e037c1be91
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -208,6 +208,7 @@ public class ExecHandler extends BaseThingHandler {
break;
case LINUX:
case MAC:
case BSD:
case SOLARIS:
// assume sh is present, should all be POSIX-compliant
shell = SHELL_NIX;
@ -397,6 +398,7 @@ public class ExecHandler extends BaseThingHandler {
public enum OS {
WINDOWS,
LINUX,
BSD,
MAC,
SOLARIS,
UNKNOWN,
@ -412,6 +414,8 @@ public class ExecHandler extends BaseThingHandler {
os = OS.WINDOWS;
} else if (operSys.contains("nix") || operSys.contains("nux") || operSys.contains("aix")) {
os = OS.LINUX;
} else if (operSys.endsWith("bsd")) {
os = OS.BSD;
} else if (operSys.contains("mac")) {
os = OS.MAC;
} else if (operSys.contains("sunos")) {