From bfccf439cfe120f5d1380a642e8b798335e1cf2e Mon Sep 17 00:00:00 2001 From: Joris van Lieshout Date: Wed, 21 May 2014 15:22:15 +0200 Subject: [PATCH] By preloading some modules we fix two things. 1. Some sysctl settings like ip_conntrack_max are not set during boot because the module is not loaded at that time. 2. Passive ftp does not work through iptables without these modules. Signed-off-by: Daan Hoogland --- .../definitions/systemvm64template/postinstall.sh | 11 +++++++++++ .../definitions/systemvmtemplate/postinstall.sh | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/tools/appliance/definitions/systemvm64template/postinstall.sh b/tools/appliance/definitions/systemvm64template/postinstall.sh index 2e0ff132e58..8763a9f2075 100644 --- a/tools/appliance/definitions/systemvm64template/postinstall.sh +++ b/tools/appliance/definitions/systemvm64template/postinstall.sh @@ -195,6 +195,16 @@ fix_vhdutil() { chmod a+x /bin/vhd-util } +# Preload these module otherwise the sysctl settings will not be set, and pasive ftp will not work. +fix_modules() { + cat >> /etc/modules << EOF +nf_conntrack_ipv4 +nf_conntrack +nf_conntrack_ftp +nf_nat_ftp +EOF +} + do_fixes() { fix_nameserver fix_inittab @@ -203,6 +213,7 @@ do_fixes() { fix_locale fix_conntrackd fix_vhdutil + fix_modules } configure_apache2() { diff --git a/tools/appliance/definitions/systemvmtemplate/postinstall.sh b/tools/appliance/definitions/systemvmtemplate/postinstall.sh index 4b3990ca563..587d44d7cf2 100644 --- a/tools/appliance/definitions/systemvmtemplate/postinstall.sh +++ b/tools/appliance/definitions/systemvmtemplate/postinstall.sh @@ -185,6 +185,16 @@ fix_vhdutil() { chmod a+x /bin/vhd-util } +# Preload these module otherwise the sysctl settings will not be set, and pasive ftp will not work. +fix_modules() { + cat >> /etc/modules << EOF +nf_conntrack_ipv4 +nf_conntrack +nf_conntrack_ftp +nf_nat_ftp +EOF +} + do_fixes() { fix_nameserver fix_inittab @@ -193,6 +203,7 @@ do_fixes() { fix_locale fix_conntrackd fix_vhdutil + fix_modules } configure_apache2() {