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
|
||||
if command -v /usr/lib/systemd/systemd-sysctl > /dev/null; then
|
||||
/usr/lib/systemd/systemd-sysctl
|
||||
elif command -v /lib/systemd/systemd-sysctl > /dev/null; then
|
||||
/lib/systemd/systemd-sysctl
|
||||
fi
|
||||
|
||||
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/tmpfiles.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
|
||||
|
||||
if is_sysvinit; then
|
||||
|
|
Loading…
Reference in New Issue