Package: iptables-persistent
Version: 0.5.7

Hello,

In OpenVZ virtual machines, the modprobe command is not always available.
This is because in OpenVZ, the kernel and modules are managed by the 
hypervisor, so there is no need of modprobe command in OpenVZ vms.

The command :
/etc/init.d/iptables-persistent save

is working fine, but it displays some error warnings:
# /etc/init.d/iptables-persistent save
[....] Saving rules.../etc/init.d/iptables-persistent: 59: 
/etc/init.d/iptables-persistent: /sbin/modprobe: not found
 IPv4.../etc/init.d/iptables-persistent: 72: /etc/init.d/iptables-persistent: 
/sbin/modprobe: not found
[ ok ...done.

I suggest the attached patch.

Thanks in advance,
Marc

--- /tmp/iptables-persistent    2013-08-18 20:01:59.435962061 +0200
+++ /etc/init.d/iptables-persistent     2013-08-18 20:01:18.863963836 +0200
@@ -56,7 +56,7 @@
 
        #save IPv4 rules
        #need at least iptable_filter loaded:
-       /sbin/modprobe -q iptable_filter
+       /sbin/modprobe -q iptable_filter 2>/dev/null
        if [ ! -f /proc/net/ip_tables_names ]; then
                log_action_cont_msg " skipping IPv4 (no modules loaded)"
        elif [ -x /sbin/iptables-save ]; then
@@ -69,7 +69,7 @@
 
        #save IPv6 rules
        #need at least ip6table_filter loaded:
-       /sbin/modprobe -q ip6table_filter
+       /sbin/modprobe -q ip6table_filter 2>/dev/null
        if [ ! -f /proc/net/ip6_tables_names ]; then
                log_action_cont_msg " skipping IPv6 (no modules loaded)"
        elif [ -x /sbin/ip6tables-save ]; then

Reply via email to