mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
Account for different paths for sysctl utilities
On some systems these utilities are in /usr/lib/systemd/systemd-sysctl and /usr/sbin/sysctl, and on others the /usr is dropped. This commit accounts for that fact.
This commit is contained in:
parent
38023fb58d
commit
404b9afeca
@ -54,6 +54,8 @@ esac
|
|||||||
# to pick up /usr/lib/sysctl.d/elasticsearch.conf
|
# to pick up /usr/lib/sysctl.d/elasticsearch.conf
|
||||||
if command -v /usr/lib/systemd/systemd-sysctl > /dev/null; then
|
if command -v /usr/lib/systemd/systemd-sysctl > /dev/null; then
|
||||||
/usr/lib/systemd/systemd-sysctl
|
/usr/lib/systemd/systemd-sysctl
|
||||||
|
elif command -v /lib/systemd/systemd-sysctl > /dev/null; then
|
||||||
|
/lib/systemd/systemd-sysctl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "x$IS_UPGRADE" != "xtrue" ]; then
|
if [ "x$IS_UPGRADE" != "xtrue" ]; then
|
||||||
|
@ -123,7 +123,11 @@ verify_package_installation() {
|
|||||||
assert_file "/usr/lib/systemd/system/elasticsearch.service" f root root 644
|
assert_file "/usr/lib/systemd/system/elasticsearch.service" f root root 644
|
||||||
assert_file "/usr/lib/tmpfiles.d/elasticsearch.conf" f root root 644
|
assert_file "/usr/lib/tmpfiles.d/elasticsearch.conf" f root root 644
|
||||||
assert_file "/usr/lib/sysctl.d/elasticsearch.conf" f root root 644
|
assert_file "/usr/lib/sysctl.d/elasticsearch.conf" f root root 644
|
||||||
[[ $(sysctl vm.max_map_count) =~ "vm.max_map_count = 262144" ]]
|
if is_rpm; then
|
||||||
|
[[ $(/usr/sbin/sysctl vm.max_map_count) =~ "vm.max_map_count = 262144" ]]
|
||||||
|
else
|
||||||
|
[[ $(/sbin/sysctl vm.max_map_count) =~ "vm.max_map_count = 262144" ]]
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if is_sysvinit; then
|
if is_sysvinit; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user