Add #!/bin/bash to /etc/rc.local

Lack of shell designation in script results in a degraded systemctl
state on Xenial.  Make this change to all element instances for
code maintenance purposes.

Change-Id: I7bcbd4bdd1623a18d1cb01a83aa7bd5a76883f7f
This commit is contained in:
Luke Browning 2017-11-20 11:26:28 -06:00
parent 5f458ffc38
commit 2ff5c83009
5 changed files with 10 additions and 0 deletions

View File

@ -7,6 +7,8 @@ set -e
set -o xtrace
cat > "/etc/rc.local" << _EOF_
#!/bin/bash
# Make sure to disable Linux kernel feature transparent huge pages,
# it will affect greatly both memory usage and latency in a negative way.
# See: http://docs.mongodb.org/manual/tutorial/transparent-huge-pages/

View File

@ -14,6 +14,8 @@ vm.overcommit_memory=0
_EOF_
cat > "/etc/rc.local" << _EOF_
#!/bin/bash
# See 'http://www.postgresql.org/docs/9.3/static/kernel-resources.html'
# Disable Linux kernel transparent huge pages. This feature is not supported by
# by Postgres 9.3 and may negatively impact performance of the database.

View File

@ -17,6 +17,8 @@ vm.nr_hugepages=64
_EOF_
cat > "/etc/rc.local" << _EOF_
#!/bin/bash
# See 'http://www.postgresql.org/docs/9.4/static/kernel-resources.html'
# Postgres 9.4 added support for THP. Using huge pages reduces overhead when
# using large contiguous chunks of memory, like PostgreSQL does.

View File

@ -21,6 +21,8 @@ net.core.somaxconn=1024
_EOF_
cat > "/etc/rc.local" << _EOF_
#!/bin/bash
# Make sure to disable Linux kernel feature transparent huge pages,
# it will affect greatly both memory usage and latency in a negative way.
if test -f /sys/kernel/mm/transparent_hugepage/defrag; then

View File

@ -41,6 +41,8 @@ TMPDIR=/tmp JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64 make
cd
cat > "/etc/rc.local" << _EOF_
#!/bin/bash
# Vertica requires THP to be turned off
if test -f /sys/kernel/mm/transparent_hugepage/defrag; then
echo never > /sys/kernel/mm/transparent_hugepage/defrag