Skip to content

Commit

Permalink
Avoid cleaning JDK security directory on CEK setup (#1053)
Browse files Browse the repository at this point in the history
Fixes #1050

Signed-off-by: Ethan Dye <[email protected]>
  • Loading branch information
ecdye authored Jul 26, 2020
1 parent ec398e0 commit e779894
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
7 changes: 3 additions & 4 deletions functions/java-jre.bash
Original file line number Diff line number Diff line change
Expand Up @@ -398,10 +398,9 @@ java_zulu_install_crypto_extension() {

echo -n "$(timestamp) [openHABian] Installing Java Zulu CEK to enable unlimited cipher strength... "
if ! cond_redirect mkdir -p "$jdkSecurity"; then echo "FAILED (create directory)"; return 1; fi
if ! cond_redirect rm -rf "${jdkSecurity:?}"/*; then echo "FAILED (clean directory)"; return 1; fi
if ! cond_redirect wget -qO "$policyTempLocation"/crypto.zip https://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip; then echo "FAILED (download)"; return 1; fi
if ! cond_redirect unzip "$policyTempLocation"/crypto.zip -d "$policyTempLocation"; then echo "FAILED (unzip)"; return 1; fi
if cond_redirect cp "$policyTempLocation"/ZuluJCEPolicies/*.jar "$jdkSecurity"; then echo "OK"; else echo "FAILED (copy)"; return 1; fi
if ! cond_redirect wget -qO "$policyTempLocation"/crypto.zip https://cdn.azul.com/zcek/bin/ZuluJCEPolicies.zip; then echo "FAILED (download)"; rm -rf "$policyTempLocation"; return 1; fi
if ! cond_redirect unzip "$policyTempLocation"/crypto.zip -d "$policyTempLocation"; then echo "FAILED (unzip)"; rm -rf "$policyTempLocation"; return 1; fi
if cond_redirect cp -u "$policyTempLocation"/ZuluJCEPolicies/*.jar "$jdkSecurity"; then echo "OK"; else echo "FAILED (copy)"; rm -rf "$policyTempLocation"; return 1; fi

cond_redirect rm -rf "$policyTempLocation"
}
Expand Down
7 changes: 5 additions & 2 deletions functions/system.bash
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,11 @@ timezone_setting() {
## setup_ntp(String option)
##
setup_ntp() {
if running_in_docker || ! is_raspbian; then echo "$(timestamp) [openHABian] Enabling time synchronization using NTP... SKIPPED"; return 0; fi

if running_in_docker || ! is_raspbian; then
echo "$(timestamp) [openHABian] Enabling time synchronization using NTP... SKIPPED"
return 0
fi

if [[ $1 == "enable" ]]; then
echo -n "$(timestamp) [openHABian] Enabling time synchronization using NTP... "
if ! cond_redirect cp "${BASEDIR:-/opt/openhabian}"/includes/50-timesyncd.conf /lib/dhcpcd/dhcpcd-hooks/; then echo "FAILED (copy)"; return 1; fi
Expand Down

0 comments on commit e779894

Please sign in to comment.