#!/bin/ash
# This script reconfigures the RLM with the info
# from the $tuples.

username=`whoami`

if [ "UN"$username = "UNroot" ]
then
	echo "1" > /mnt/logs/var/ip6fw_disable
	if [ -f /mnt/jffs2_rootfs_primary/etc/syslog_ipfw.conf ]
	then
		cp /mnt/jffs2_rootfs_primary/etc/syslog_ipfw.conf  \
			/mnt/jffs2_rootfs_primary/etc/syslog.conf
	fi

	iptables -F
	iptables -X
	iptables -t mangle -F
	iptables -t mangle -X
	iptables -P INPUT ACCEPT
	iptables -P FORWARD ACCEPT
	iptables -P OUTPUT ACCEPT
	ip6tables -F
	ip6tables -X
	ip6tables -t mangle -F
	ip6tables -t mangle -X
	ip6tables -P INPUT ACCEPT
	ip6tables -P FORWARD ACCEPT
	ip6tables -P OUTPUT ACCEPT
	
	sync
	sleep 3
fi

