PREUN
/bin/sh
if [ $1 = 0 ]; then
/sbin/chkconfig --del vz >/dev/null 2>&1
fi
POSTIN
/bin/sh
/bin/rm -rf /dev/vzctl
/bin/mknod -m 600 /dev/vzctl c 126 0
if [ -f /etc/vz/vz.conf ]; then
if ! grep "IPTABLES=" /etc/vz/vz.conf >/dev/null 2>&1; then
echo 'IPTABLES="ipt_REJECT ipt_tos ipt_limit ipt_multiport iptable_filter iptable_mangle ipt_TCPMSS ipt_tcpmss ipt_ttl ipt_length"' >> /etc/vz/vz.conf
fi
fi
/sbin/chkconfig --add vz > /dev/null 2>&1
if [ -f /etc/SuSE-release ]; then
NET_CFG='ifdown-venet ifup-venet'
if ! grep -q -E "^alias venet0" /etc/modprobe.conf; then
echo "alias venet0 vznet" >> /etc/modprobe.conf
fi
ln -f /etc/sysconfig/network-scripts/ifcfg-venet0 /etc/sysconfig/network/ifcfg-venet0
for file in ${NET_CFG}; do
ln -sf /etc/sysconfig/network-scripts/${file} /etc/sysconfig/network/scripts/${file}
done
fi