From 5eaecfb176a8cdb84c0ec68a5c5002b517c58d23 Mon Sep 17 00:00:00 2001 From: Dom G Date: Tue, 15 Sep 2026 15:08:21 -0400 Subject: [PATCH 1/2] Fix props file newline potential bugs --- conf/accumulo/2/accumulo.properties | 2 +- plugins/accumulo-encryption.sh | 8 ++++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/conf/accumulo/2/accumulo.properties b/conf/accumulo/2/accumulo.properties index 60918eb..0f78a59 100755 --- a/conf/accumulo/2/accumulo.properties +++ b/conf/accumulo/2/accumulo.properties @@ -7,4 +7,4 @@ tserver.memory.maps.native.enabled=ACCUMULO_USE_NATIVE_MAP tserver.wal.max.size=512M tserver.port.search=true compactor.port.search=true -sserver.port.search=true \ No newline at end of file +sserver.port.search=true diff --git a/plugins/accumulo-encryption.sh b/plugins/accumulo-encryption.sh index 3d1bbdf..1a225d1 100755 --- a/plugins/accumulo-encryption.sh +++ b/plugins/accumulo-encryption.sh @@ -25,5 +25,9 @@ fi accumulo_conf=$ACCUMULO_HOME/conf/accumulo.properties encrypt_key=$ACCUMULO_HOME/conf/data-encryption.key openssl rand -out $encrypt_key 32 -echo "instance.crypto.opts.key.uri=file://$encrypt_key" >>"$accumulo_conf" -echo "instance.crypto.service=$(jar -tvf "$ACCUMULO_HOME"/lib/accumulo-core-2.*.jar | grep -o 'org.apache.accumulo.core.*AESCryptoService' | tr / . | tail -1)" >>"$accumulo_conf" +{ + echo + echo "# added by the accumulo-encryption plugin" + echo "instance.crypto.opts.key.uri=file://$encrypt_key" + echo "instance.crypto.service=$(jar -tvf "$ACCUMULO_HOME"/lib/accumulo-core-*.jar | grep -o 'org.apache.accumulo.core.*AESCryptoService' | tr / . | tail -1)" +} >>"$accumulo_conf" From 89d6c037a97ad234dfa21211fa6231212e922427 Mon Sep 17 00:00:00 2001 From: Christopher Tubbs Date: Thu, 17 Sep 2026 18:56:19 -0400 Subject: [PATCH 2/2] Improve readability with heredoc --- plugins/accumulo-encryption.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/accumulo-encryption.sh b/plugins/accumulo-encryption.sh index 1a225d1..83ed5ff 100755 --- a/plugins/accumulo-encryption.sh +++ b/plugins/accumulo-encryption.sh @@ -24,10 +24,10 @@ fi accumulo_conf=$ACCUMULO_HOME/conf/accumulo.properties encrypt_key=$ACCUMULO_HOME/conf/data-encryption.key -openssl rand -out $encrypt_key 32 -{ - echo - echo "# added by the accumulo-encryption plugin" - echo "instance.crypto.opts.key.uri=file://$encrypt_key" - echo "instance.crypto.service=$(jar -tvf "$ACCUMULO_HOME"/lib/accumulo-core-*.jar | grep -o 'org.apache.accumulo.core.*AESCryptoService' | tr / . | tail -1)" -} >>"$accumulo_conf" +openssl rand -out "$encrypt_key" 32 +cat >>"$accumulo_conf" <