Fixes for grub and TCP syn cookies.
* Make sure 'apt upgrade' can handle grub changes without asking for
help.
* Turn off TCP syn cookies because performance.
Authored-by: Sean Goller <sgoller@pivotal.io>
diff --git a/infrastructure/scripts/aws/image/build_image.sh b/infrastructure/scripts/aws/image/build_image.sh
old mode 100644
new mode 100755
diff --git a/infrastructure/scripts/aws/image/packer.json b/infrastructure/scripts/aws/image/packer.json
index 948d57e..1621ca4 100644
--- a/infrastructure/scripts/aws/image/packer.json
+++ b/infrastructure/scripts/aws/image/packer.json
@@ -43,11 +43,12 @@
"type": "shell",
"inline": [
"sudo apt update",
- "sudo apt upgrade -y",
+ "sudo UCF_FORCE_CONFFOLD= UCF_FORCE_CONFFNEW=YES apt upgrade -y",
"sudo apt install -y openjdk-8-jdk unzip dstat",
"sudo update-java-alternatives -s java-1.8.0-openjdk-amd64",
"sudo mv /tmp/defaults.cfg /etc/cloud/cloud.cfg.d/defaults.cfg",
- "sudo sh -c \"echo 'StrictHostKeyChecking no' >> /etc/ssh/ssh_config\""
+ "sudo sh -c \"echo 'StrictHostKeyChecking no' >> /etc/ssh/ssh_config\"",
+ "sudo sh -c \"echo 'net.ipv4.tcp_syncookies = 0' >> /etc/sysctl.conf\""
]
}
]