# Recipe for version 2.6.0 by Daniele Maccari, on Thu Jan 17 18:09:15 CET 2008
# Recipe (MakeRecipe) for Guarddog by Viola Zoli, Hungary, violazoli@gmail.com, on 2008. jan. 15., kedd, 09.01.38 CET
compile_version=1.10.0
url="http://freshmeat.net/redir/guarddog/3947/url_tgz/guarddog-2.6.0.tar.gz"
file_size=978107
file_md5=94753f72d62974914485c9aae07b1772
file="guarddog-2.6.0.tar.gz"
dir="guarddog-2.4.0"
recipe_type=configure

post_install_message="Remember to add this line to ${goboSettings}/BootScripts/BootUp\nin order to load the rules defined with Guarddog at startup:\nExec 'Loading firewall rules...' Guarddog Start"

pre_build(){
	#Check for iptables
	if ! zcat $goboStatus/config.gz | grep -q "CONFIG_IP_NF_IPTABLES=[m,y]"; then
		Log_Error "Your kernel does not support iptables or \
configuration could not be read. Make sure you have enabled \
CONFIG_IP_NF_IPTABLES=y/m in your kernel or reconfigure your kernel \
to include it."
		Ask_Continue "Do you want to continue anyway? (Not recommended \
			unless you know what you do)"
	fi
}

post_install(){
	if zcat $goboStatus/config.gz | grep -q "CONFIG_IP_NS_IPTABLES=m"; then
		echo You seem to have iptables built as a module.\
			Be sure to load it at startup in order to use this program.
	fi
}
