Skip to content

Commit bfccf43

Browse files
jvanlieshoutDaanHoogland
authored andcommitted
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 <daan@onecht.net>
1 parent b666a1f commit bfccf43

2 files changed

Lines changed: 22 additions & 0 deletions

File tree

tools/appliance/definitions/systemvm64template/postinstall.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,16 @@ fix_vhdutil() {
195195
chmod a+x /bin/vhd-util
196196
}
197197

198+
# Preload these module otherwise the sysctl settings will not be set, and pasive ftp will not work.
199+
fix_modules() {
200+
cat >> /etc/modules << EOF
201+
nf_conntrack_ipv4
202+
nf_conntrack
203+
nf_conntrack_ftp
204+
nf_nat_ftp
205+
EOF
206+
}
207+
198208
do_fixes() {
199209
fix_nameserver
200210
fix_inittab
@@ -203,6 +213,7 @@ do_fixes() {
203213
fix_locale
204214
fix_conntrackd
205215
fix_vhdutil
216+
fix_modules
206217
}
207218

208219
configure_apache2() {

tools/appliance/definitions/systemvmtemplate/postinstall.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,16 @@ fix_vhdutil() {
185185
chmod a+x /bin/vhd-util
186186
}
187187

188+
# Preload these module otherwise the sysctl settings will not be set, and pasive ftp will not work.
189+
fix_modules() {
190+
cat >> /etc/modules << EOF
191+
nf_conntrack_ipv4
192+
nf_conntrack
193+
nf_conntrack_ftp
194+
nf_nat_ftp
195+
EOF
196+
}
197+
188198
do_fixes() {
189199
fix_nameserver
190200
fix_inittab
@@ -193,6 +203,7 @@ do_fixes() {
193203
fix_locale
194204
fix_conntrackd
195205
fix_vhdutil
206+
fix_modules
196207
}
197208

198209
configure_apache2() {

0 commit comments

Comments
 (0)