diff --git a/distribution/packages/src/common/scripts/postinst b/distribution/packages/src/common/scripts/postinst index 70b1d41d1e947..45ff73fbe58f1 100644 --- a/distribution/packages/src/common/scripts/postinst +++ b/distribution/packages/src/common/scripts/postinst @@ -115,7 +115,7 @@ if [ ! -f "$ES_PATH_CONF"/elasticsearch.keystore ]; then /usr/share/elasticsearch/bin/elasticsearch-keystore create chown root:elasticsearch "$ES_PATH_CONF"/elasticsearch.keystore chmod 660 "$ES_PATH_CONF"/elasticsearch.keystore - md5sum "$ES_PATH_CONF"/elasticsearch.keystore > "$ES_PATH_CONF"/elasticsearch.keystore.md5sum + md5sum "$ES_PATH_CONF"/elasticsearch.keystore > "$ES_PATH_CONF"/.elasticsearch.keystore.initial_md5sum fi ${scripts.footer} diff --git a/distribution/packages/src/common/scripts/prerm b/distribution/packages/src/common/scripts/prerm index 6a4c729ecdd46..e2e9faa9cde21 100644 --- a/distribution/packages/src/common/scripts/prerm +++ b/distribution/packages/src/common/scripts/prerm @@ -73,8 +73,8 @@ if [ "$STOP_REQUIRED" = "true" ]; then fi if [ -f "$ES_PATH_CONF"/elasticsearch.keystore ]; then - if md5sum --status -c "$ES_PATH_CONF"/elasticsearch.keystore.md5sum; then - rm "$ES_PATH_CONF"/elasticsearch.keystore "$ES_PATH_CONF"/elasticsearch.keystore.md5sum + if md5sum --status -c "$ES_PATH_CONF"/.elasticsearch.keystore.initial_md5sum; then + rm "$ES_PATH_CONF"/elasticsearch.keystore "$ES_PATH_CONF"/.elasticsearch.keystore.initial_md5sum fi fi diff --git a/qa/vagrant/src/test/resources/packaging/tests/30_deb_package.bats b/qa/vagrant/src/test/resources/packaging/tests/30_deb_package.bats index fb776c593c795..0b06e74555394 100644 --- a/qa/vagrant/src/test/resources/packaging/tests/30_deb_package.bats +++ b/qa/vagrant/src/test/resources/packaging/tests/30_deb_package.bats @@ -151,7 +151,7 @@ setup() { assert_file_exist "/etc/elasticsearch" # TODO: use ucf to handle these better for Debian-based systems assert_file_not_exist "/etc/elasticsearch/elasticsearch.keystore" - assert_file_not_exist "/etc/elasticsearch/elasticsearch.keystore.md5sum" + assert_file_not_exist "/etc/elasticsearch/.elasticsearch.keystore.initial_md5sum" assert_file_exist "/etc/elasticsearch/elasticsearch.yml" assert_file_exist "/etc/elasticsearch/jvm.options" assert_file_exist "/etc/elasticsearch/log4j2.properties" @@ -174,7 +174,7 @@ setup() { # all remaining files are deleted by the purge assert_file_not_exist "/etc/elasticsearch" assert_file_not_exist "/etc/elasticsearch/elasticsearch.keystore" - assert_file_not_exist "/etc/elasticsearch/elasticsearch.keystore.md5sum" + assert_file_not_exist "/etc/elasticsearch/.elasticsearch.keystore.initial_md5sum" assert_file_not_exist "/etc/elasticsearch/elasticsearch.yml" assert_file_not_exist "/etc/elasticsearch/jvm.options" assert_file_not_exist "/etc/elasticsearch/log4j2.properties" diff --git a/qa/vagrant/src/test/resources/packaging/utils/packages.bash b/qa/vagrant/src/test/resources/packaging/utils/packages.bash index efb00aae68cac..01ad9258cdbed 100644 --- a/qa/vagrant/src/test/resources/packaging/utils/packages.bash +++ b/qa/vagrant/src/test/resources/packaging/utils/packages.bash @@ -99,7 +99,7 @@ verify_package_installation() { sudo -u elasticsearch "$ESHOME/bin/elasticsearch-keystore" list | grep "keystore.seed" - assert_file "$ESCONFIG/elasticsearch.keystore.md5sum" f root elasticsearch 644 + assert_file "$ESCONFIG/.elasticsearch.keystore.initial_md5sum" f root elasticsearch 644 assert_file "$ESCONFIG/elasticsearch.yml" f root elasticsearch 660 assert_file "$ESCONFIG/jvm.options" f root elasticsearch 660 assert_file "$ESCONFIG/log4j2.properties" f root elasticsearch 660