diff options
author | Mohit Mehta <mohit@vyatta.com> | 2010-09-13 14:04:13 -0700 |
---|---|---|
committer | Mohit Mehta <mohit@vyatta.com> | 2010-09-13 14:04:13 -0700 |
commit | 7afe9e82b60be763398531295d03f7215f21d94b (patch) | |
tree | 5979392a3b37c8b2459ddefda83b80f538397ad9 | |
parent | 8edddaa5dbadbb35ed2d6f2fd3da7c5997d093e0 (diff) | |
download | vyatta-cfg-firewall-7afe9e82b60be763398531295d03f7215f21d94b.tar.gz vyatta-cfg-firewall-7afe9e82b60be763398531295d03f7215f21d94b.zip |
Fix Bug 6149 Warning on boot because of modprobe config file names
* add .conf suffix to files in /etc/modprobe.d
* remove old files without the suffix [from a previous release] during upgrade
-rw-r--r-- | Makefile.am | 4 | ||||
-rw-r--r-- | debian/vyatta-cfg-firewall.postinst.in | 10 | ||||
-rw-r--r-- | etc/modprobe.d/vyatta_nf_conntrack.conf (renamed from etc/modprobe.d/vyatta_nf_conntrack) | 0 | ||||
-rw-r--r-- | etc/modprobe.d/vyatta_xt_recent.conf (renamed from etc/modprobe.d/vyatta_xt_recent) | 0 | ||||
-rw-r--r-- | templates/firewall/conntrack-hash-size/node.def | 6 | ||||
-rw-r--r-- | templates/firewall/node.def | 6 |
6 files changed, 18 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am index d76794a..b87b091 100644 --- a/Makefile.am +++ b/Makefile.am @@ -3,8 +3,8 @@ share_perl5dir = /opt/vyatta/share/perl5/Vyatta/IpTables curverdir = $(sysconfdir)/config-migrate/current modprobedir = /etc/modprobe.d -modprobe_DATA = etc/modprobe.d/vyatta_nf_conntrack -modprobe_DATA += etc/modprobe.d/vyatta_xt_recent +modprobe_DATA = etc/modprobe.d/vyatta_nf_conntrack.conf +modprobe_DATA += etc/modprobe.d/vyatta_xt_recent.conf sbin_SCRIPTS = share_perl5_DATA = diff --git a/debian/vyatta-cfg-firewall.postinst.in b/debian/vyatta-cfg-firewall.postinst.in index 9b86330..3bfd95e 100644 --- a/debian/vyatta-cfg-firewall.postinst.in +++ b/debian/vyatta-cfg-firewall.postinst.in @@ -8,3 +8,13 @@ sbindir=@sbindir@ # add symlinks for sudo ln -sf /opt/vyatta/sbin/vyatta-ipset.pl ${bindir}/sudo-users/vyatta-ipset.pl + + +# comply with Squeeze version of modprobe +# remove old versions of files during upgrade +for modprobe in vyatta_nf_conntrack vyatta_xt_recent +do + if [ -f /etc/modprobe.d/${modprobe} ]; then + rm -f /etc/modprobe.d/${modprobe} + fi +done diff --git a/etc/modprobe.d/vyatta_nf_conntrack b/etc/modprobe.d/vyatta_nf_conntrack.conf index b907431..b907431 100644 --- a/etc/modprobe.d/vyatta_nf_conntrack +++ b/etc/modprobe.d/vyatta_nf_conntrack.conf diff --git a/etc/modprobe.d/vyatta_xt_recent b/etc/modprobe.d/vyatta_xt_recent.conf index d517838..d517838 100644 --- a/etc/modprobe.d/vyatta_xt_recent +++ b/etc/modprobe.d/vyatta_xt_recent.conf diff --git a/templates/firewall/conntrack-hash-size/node.def b/templates/firewall/conntrack-hash-size/node.def index d4c2027..16b7c6c 100644 --- a/templates/firewall/conntrack-hash-size/node.def +++ b/templates/firewall/conntrack-hash-size/node.def @@ -8,11 +8,11 @@ val_help: u32:1-50000000; Size of hash to use for connection tracking table syntax:expression: ($VAR(@) >= 1 && $VAR(@) <= 50000000) ; "Value must be between 1 and 50,000,000" update: - if ! grep -q "nf_conntrack hashsize=$VAR(@)$" /etc/modprobe.d/vyatta_nf_conntrack + if ! grep -q "nf_conntrack hashsize=$VAR(@)$" /etc/modprobe.d/vyatta_nf_conntrack.conf then sudo sh -c "sed -i -e '/options nf_conntrack hashsize/d' \ - /etc/modprobe.d/vyatta_nf_conntrack" + /etc/modprobe.d/vyatta_nf_conntrack.conf" sudo sh -c "echo options nf_conntrack hashsize=$VAR(@) >> \ - /etc/modprobe.d/vyatta_nf_conntrack" + /etc/modprobe.d/vyatta_nf_conntrack.conf" echo "Updated conntrack hash size. This change will take affect when the system is rebooted." fi diff --git a/templates/firewall/node.def b/templates/firewall/node.def index e95bc07..30b5330 100644 --- a/templates/firewall/node.def +++ b/templates/firewall/node.def @@ -8,12 +8,12 @@ delete: # set conntrack table size to standard 16384 entries if fw disabled sudo sh -c "echo 2048 > /proc/sys/net/netfilter/nf_conntrack_expect_max" # set conntrack hash size to standard 4096 - if ! grep -q "nf_conntrack hashsize=4096$" /etc/modprobe.d/vyatta_nf_conntrack + if ! grep -q "nf_conntrack hashsize=4096$" /etc/modprobe.d/vyatta_nf_conntrack.conf then sudo sh -c "sed -i -e '/options nf_conntrack hashsize/d' \ - /etc/modprobe.d/vyatta_nf_conntrack" + /etc/modprobe.d/vyatta_nf_conntrack.conf" sudo sh -c "echo options nf_conntrack hashsize=4096 >> \ - /etc/modprobe.d/vyatta_nf_conntrack" + /etc/modprobe.d/vyatta_nf_conntrack.conf" echo "Conntrack hash size set to default 4096. This change will take affect when the system is rebooted." fi |