#! /bin/csh -f

	source scripts/aliases

	set bootsec = 0
	set plural=""
	if ($solaris2) then
		set bootdir = /etc/rcS.d
		set plural = s
	endif
	if ($sunos4) set bootdir=/etc/rc.boot
	if ($hpux == 10) then
		set bootdir = /sbin/rc2.d
		set plural = s
	endif
	if ($hpux == 9) set bootdir=/etc/brc

	E ""
	E -n "Do you wish to modify your "$bootdir" boot script"$plural" to "
	E "allow a default" 
	E -n "filter to be automatically installed during boot (y/n) [y] ? "
	get dans
	E ""

	fwrand

	if (("X$dans" != "X") && "X$dans" != "Xy") goto ok

selectfilter:
	E "Which default filter do you wish to use?"
	E "----------------------------------------"
	E "(1) Allow only traffic necessary for boot"
	E "(2) Drop all traffic"
	E ""
	E -n "Enter your selection (1-2) [1]: "
	get filtersel
 	E ""

	fwrand

	if ("X$filtersel" == "X" || "X$filtersel" == "X1") then
		set bootsec = 1
	else
		if ("X$filtersel" == "X2") then
			set bootsec = 2
		else
			goto selectfilter
		endif
	endif
ok:
	if ($#argv == 1) then 
		echo "Bootsec=$bootsec" >> $1
	endif
	exit 0
