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

Signed-off-by: Juergen Weber <weberjn@gmail.com>
This commit is contained in:
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; break;
case LINUX: case LINUX:
case MAC: case MAC:
case BSD:
case SOLARIS: case SOLARIS:
// assume sh is present, should all be POSIX-compliant // assume sh is present, should all be POSIX-compliant
shell = SHELL_NIX; shell = SHELL_NIX;
@ -397,6 +398,7 @@ public class ExecHandler extends BaseThingHandler {
public enum OS { public enum OS {
WINDOWS, WINDOWS,
LINUX, LINUX,
BSD,
MAC, MAC,
SOLARIS, SOLARIS,
UNKNOWN, UNKNOWN,
@ -412,6 +414,8 @@ public class ExecHandler extends BaseThingHandler {
os = OS.WINDOWS; os = OS.WINDOWS;
} else if (operSys.contains("nix") || operSys.contains("nux") || operSys.contains("aix")) { } else if (operSys.contains("nix") || operSys.contains("nux") || operSys.contains("aix")) {
os = OS.LINUX; os = OS.LINUX;
} else if (operSys.endsWith("bsd")) {
os = OS.BSD;
} else if (operSys.contains("mac")) { } else if (operSys.contains("mac")) {
os = OS.MAC; os = OS.MAC;
} else if (operSys.contains("sunos")) { } else if (operSys.contains("sunos")) {