diff --git a/integration/client-cli/admin-cli/src/main/bin/kcadm.sh b/integration/client-cli/admin-cli/src/main/bin/kcadm.sh index 49e82355c0..c626e1ec34 100755 --- a/integration/client-cli/admin-cli/src/main/bin/kcadm.sh +++ b/integration/client-cli/admin-cli/src/main/bin/kcadm.sh @@ -10,6 +10,10 @@ case "`uname`" in FreeBSD) RESOLVED_NAME=`readlink -f "$0"` ;; + OpenBSD) + RESOLVED_NAME=`readlink -f "$0"` + JAVA_HOME=`/usr/local/bin/javaPathHelper -h keycloak` + ;; Linux) RESOLVED_NAME=`readlink -f "$0"` ;; diff --git a/integration/client-cli/admin-cli/src/main/java/org/keycloak/client/admin/cli/util/OsUtil.java b/integration/client-cli/admin-cli/src/main/java/org/keycloak/client/admin/cli/util/OsUtil.java index 63e49c66c4..3b70f47ad6 100644 --- a/integration/client-cli/admin-cli/src/main/java/org/keycloak/client/admin/cli/util/OsUtil.java +++ b/integration/client-cli/admin-cli/src/main/java/org/keycloak/client/admin/cli/util/OsUtil.java @@ -58,6 +58,8 @@ public class OsUtil { return new OsArch("osx", "x86_64"); } else if (os.startsWith("freebsd")) { return new OsArch("freebsd", arch); + } else if (os.startsWith("openbsd")) { + return new OsArch("openbsd", arch); } // unsupported platform diff --git a/integration/client-cli/client-registration-cli/src/main/bin/kcreg.sh b/integration/client-cli/client-registration-cli/src/main/bin/kcreg.sh index 7f9e44aef7..d394cdf11a 100755 --- a/integration/client-cli/client-registration-cli/src/main/bin/kcreg.sh +++ b/integration/client-cli/client-registration-cli/src/main/bin/kcreg.sh @@ -10,6 +10,10 @@ case "`uname`" in FreeBSD) RESOLVED_NAME=`readlink -f "$0"` ;; + OpenBSD) + RESOLVED_NAME=`readlink -f "$0"` + JAVA_HOME=`/usr/local/bin/javaPathHelper -h keycloak` + ;; Linux) RESOLVED_NAME=`readlink -f "$0"` ;; diff --git a/integration/client-cli/client-registration-cli/src/main/java/org/keycloak/client/registration/cli/util/OsUtil.java b/integration/client-cli/client-registration-cli/src/main/java/org/keycloak/client/registration/cli/util/OsUtil.java index 0bbb490a09..1dd54b1348 100644 --- a/integration/client-cli/client-registration-cli/src/main/java/org/keycloak/client/registration/cli/util/OsUtil.java +++ b/integration/client-cli/client-registration-cli/src/main/java/org/keycloak/client/registration/cli/util/OsUtil.java @@ -42,6 +42,8 @@ public class OsUtil { return new OsArch("osx", "x86_64"); } else if (os.startsWith("freebsd")) { return new OsArch("freebsd", arch); + } else if (os.startsWith("openbsd")) { + return new OsArch("openbsd", arch); } // unsupported platform diff --git a/quarkus/dist/src/main/content/bin/kc.sh b/quarkus/dist/src/main/content/bin/kc.sh index 76f3abfddf..80ed3e80e3 100644 --- a/quarkus/dist/src/main/content/bin/kc.sh +++ b/quarkus/dist/src/main/content/bin/kc.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash case "$(uname)" in CYGWIN*) @@ -12,6 +12,10 @@ case "$(uname)" in FreeBSD) RESOLVED_NAME="$(readlink -f "$0")" ;; + OpenBSD) + RESOLVED_NAME="$(readlink -f "$0")" + JAVA_HOME="$(/usr/local/bin/javaPathHelper -h keycloak)" + ;; Linux) RESOLVED_NAME="$(readlink -f "$0")" ;; diff --git a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/cli/OsUtils.java b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/cli/OsUtils.java index a0a282f4a0..e9777ea930 100644 --- a/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/cli/OsUtils.java +++ b/testsuite/integration-arquillian/tests/base/src/main/java/org/keycloak/testsuite/cli/OsUtils.java @@ -39,6 +39,8 @@ public class OsUtils { return new OsArch("osx", "x86_64"); } else if (os.startsWith("freebsd")) { return new OsArch("freebsd", arch); + } else if (os.startsWith("openbsd")) { + return new OsArch("openbsd", arch); } // unsupported platform