head	1.2;
access;
symbols
	perseant-exfatfs-base-20250801:1.2
	perseant-exfatfs-base-20240630:1.2
	perseant-exfatfs:1.2.0.34
	perseant-exfatfs-base:1.2
	cjep_sun2x:1.2.0.32
	cjep_sun2x-base:1.2
	cjep_staticlib_x-base1:1.2
	cjep_staticlib_x:1.2.0.30
	cjep_staticlib_x-base:1.2
	phil-wifi-20200421:1.2
	phil-wifi-20200411:1.2
	phil-wifi-20200406:1.2
	pgoyette-compat-merge-20190127:1.2
	pgoyette-compat-20190127:1.2
	pgoyette-compat-20190118:1.2
	pgoyette-compat-1226:1.2
	pgoyette-compat-1126:1.2
	pgoyette-compat-1020:1.2
	pgoyette-compat-0930:1.2
	pgoyette-compat-0906:1.2
	pgoyette-compat-0728:1.2
	pgoyette-compat-0625:1.2
	pgoyette-compat-0521:1.2
	pgoyette-compat-0502:1.2
	pgoyette-compat-0422:1.2
	pgoyette-compat-0415:1.2
	pgoyette-compat-0407:1.2
	pgoyette-compat-0330:1.2
	pgoyette-compat-0322:1.2
	pgoyette-compat-0315:1.2
	pgoyette-compat:1.2.0.28
	pgoyette-compat-base:1.2
	prg-localcount2-base3:1.2
	prg-localcount2-base2:1.2
	prg-localcount2-base1:1.2
	prg-localcount2:1.2.0.26
	prg-localcount2-base:1.2
	pgoyette-localcount-20170426:1.2
	bouyer-socketcan-base1:1.2
	pgoyette-localcount-20170320:1.2
	bouyer-socketcan:1.2.0.24
	bouyer-socketcan-base:1.2
	pgoyette-localcount-20170107:1.2
	pgoyette-localcount-20161104:1.2
	localcount-20160914:1.2
	pgoyette-localcount-20160806:1.2
	pgoyette-localcount-20160726:1.2
	pgoyette-localcount:1.2.0.22
	pgoyette-localcount-base:1.2
	netbsd-5-2-3-RELEASE:1.2
	netbsd-5-1-5-RELEASE:1.2
	yamt-pagecache-base9:1.2
	yamt-pagecache-tag8:1.2
	tls-earlyentropy:1.2.0.18
	tls-earlyentropy-base:1.2
	riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.2
	riastradh-drm2-base3:1.2
	netbsd-5-2-2-RELEASE:1.2
	netbsd-5-1-4-RELEASE:1.2
	netbsd-5-2-1-RELEASE:1.2
	netbsd-5-1-3-RELEASE:1.2
	agc-symver:1.2.0.20
	agc-symver-base:1.2
	tls-maxphys-base:1.2
	yamt-pagecache-base8:1.2
	netbsd-5-2:1.2.0.16
	yamt-pagecache-base7:1.2
	netbsd-5-2-RELEASE:1.2
	netbsd-5-2-RC1:1.2
	yamt-pagecache-base6:1.2
	yamt-pagecache-base5:1.2
	yamt-pagecache-base4:1.2
	netbsd-5-1-2-RELEASE:1.2
	netbsd-5-1-1-RELEASE:1.2
	yamt-pagecache-base3:1.2
	yamt-pagecache-base2:1.2
	yamt-pagecache:1.2.0.2
	yamt-pagecache-base:1.2
	bouyer-quota2-nbase:1.2
	bouyer-quota2:1.2.0.14
	bouyer-quota2-base:1.2
	matt-nb5-pq3:1.2.0.12
	matt-nb5-pq3-base:1.2
	netbsd-5-1:1.2.0.10
	netbsd-5-1-RELEASE:1.2
	netbsd-5-1-RC4:1.2
	netbsd-5-1-RC3:1.2
	netbsd-5-1-RC2:1.2
	netbsd-5-1-RC1:1.2
	netbsd-5-0-2-RELEASE:1.2
	netbsd-5-0-1-RELEASE:1.2
	jym-xensuspend-nbase:1.2
	netbsd-5-0:1.2.0.8
	netbsd-5-0-RELEASE:1.2
	netbsd-5-0-RC4:1.2
	netbsd-5-0-RC3:1.2
	netbsd-5-0-RC2:1.2
	jym-xensuspend:1.2.0.6
	jym-xensuspend-base:1.2
	netbsd-5-0-RC1:1.2
	netbsd-5:1.2.0.4
	netbsd-5-base:1.2
	wrstuden-revivesa-base:1.1.1.1
	wrstuden-revivesa-base-1:1.1.1.1
	yamt-pf42-base4:1.1.1.1
	yamt-pf42:1.1.1.1.0.2
	yamt-pf42-base3:1.1.1.1
	hpcarm-cleanup-nbase:1.1.1.1
	v4-1-29:1.1.1.1
	DARRENR:1.1.1;
locks; strict;
comment	@# @;


1.2
date	2008.08.12.10.28.51;	author martti;	state dead;
branches;
next	1.1;

1.1
date	2008.05.20.06.44.53;	author darrenr;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	2008.05.20.06.44.53;	author darrenr;	state Exp;
branches
	1.1.1.1.2.1;
next	;

1.1.1.1.2.1
date	2008.05.20.06.44.53;	author yamt;	state dead;
branches;
next	1.1.1.1.2.2;

1.1.1.1.2.2
date	2008.06.04.02.03.02;	author yamt;	state Exp;
branches;
next	;


desc
@@


1.2
log
@Not needed in NetBSD
@
text
@#!/bin/ksh
SBIN=/usr/sbin
debug=echo
undo=0

update() {
	echo "UPDATE $1 $2 $3"
	base=$1
	dir=$2
	file=$3
	Z=$IFS
	IFS=:
	set $file
	if [[ -z $2 ]] ; then
		o=$1
		n=$1
	else
		o=$1
		n=$2
	fi
	set $dir
	sdir=$1
	ddir=$2
	IFS=$Z

	if [[ -z ${sdir} && ! -d ${base}/${ddir} ]] ; then
		ddir=
	fi

	sprog=${cpudir}/${sdir}/${n}
	dprog=${base}/${ddir}/${o}

	if [[ $undo -eq 0 ]] ; then
		if [[ -d ${base}/${ddir} ]] ; then
			if [[ ! -f ${dprog}.dist ]] ; then
				$debug /bin/mv ${dprog} ${dprog}.dist
				$debug /bin/cp -p ${dprog}.dist ${dprog}
			fi
			$debug /bin/cp ${sprog} ${dprog}
		else
			links=$(/bin/ls -dl ${dprog} | awk ' { print $2; } ' -)
			if [[ $links -eq 1 ]] ; then
				if [[ ! -f ${dprog}.dist ]] ; then
					$debug /bin/mv ${dprog} ${dprog}.dist
					$debug /bin/cp -p ${dprog}.dist ${dprog}
				fi
				$debug /bin/cp ${sprog} ${dprog}
			fi
		fi
	else
		if [[ -f ${dprog}.dist ]] ; then
			$debug /bin/mv -f ${dprog}.dist ${dprog}
		fi
	fi
}

while [[ $# -gt 0 ]] ; do
	case $1 in
	undo)
		undo=1
		;;
	-f)
		debug=
		;;
	-d)
		debug=echo
		;;
	esac
	shift
done

case $(pwd) in
*/SunOS5)
	;;
*/SunOS5/*)
	exit 1
	;;
*)
	cd SunOS5
	;;
esac
cpu=`uname -p`
cpudir=${cpu}-`uname -r`

if [[ -d ${cpudir}/amd64 ]] ; then
	big=amd64
fi
if [[ -d ${cpudir}/sparcv9 ]] ; then
	big=sparcv9
fi
if [[ -d ${cpudir}/i86 ]] ; then
	small=i86
fi
if [[ -d ${cpudir}/sparc ]] ; then
	small=sparc
fi
echo "$cpudir.$big.$small."

if [[ -n ${big} ]] ; then
	for i in ipf:ipf.exe ipfs ipfstat ipmon ipnat ippool; do
		update $SBIN ${big}:${big} $i
	done
	update /usr/lib/ipf ${big}:${big} ipftest
	update /usr/kernel/drv ${big}:${big} ipf
fi
if [[ -n ${small} ]] ; then
	for i in ipf:ipf.exe ipfs ipfstat ipmon ipnat ippool; do
		update $SBIN ${small}:${small} $i
	done
	update /usr/lib/ipf ${small}:${small} ipftest
	update /usr/kernel/drv ":" ipf
fi
if [[ -z ${small} && -z ${big} ]] ; then
	if [[ -z ${small} ]] ; then
		case ${cpu} in
		i386)
			small=i86
			;;
		sparc)
			small=sparc
			;;
		esac
	fi
	for i in ipf:ipf.exe ipfs ipfstat ipmon ipnat ippool; do
		update $SBIN :${small} $i
	done
	update /usr/lib/ipf :${small} ipftest
	update /usr/kernel/drv :${small} ipf
fi

cpudir=..
for i in ip_compat.h ip_fil.h ipl.h ip_nat.h ip_state.h ip_sync.h ip_scan.h \
	 ip_pool.h ip_lookup.h; do
	update /usr/include/netinet : $i
	update /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/include/netinet/ : $i
done
exit 0
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Import IPFilter 4.1.29 to the vendor branch
@
text
@@


1.1.1.1.2.1
log
@file replace was added on branch yamt-pf42 on 2008-06-04 02:03:02 +0000
@
text
@d1 137
@


1.1.1.1.2.2
log
@sync with head
@
text
@a0 137
#!/bin/ksh
SBIN=/usr/sbin
debug=echo
undo=0

update() {
	echo "UPDATE $1 $2 $3"
	base=$1
	dir=$2
	file=$3
	Z=$IFS
	IFS=:
	set $file
	if [[ -z $2 ]] ; then
		o=$1
		n=$1
	else
		o=$1
		n=$2
	fi
	set $dir
	sdir=$1
	ddir=$2
	IFS=$Z

	if [[ -z ${sdir} && ! -d ${base}/${ddir} ]] ; then
		ddir=
	fi

	sprog=${cpudir}/${sdir}/${n}
	dprog=${base}/${ddir}/${o}

	if [[ $undo -eq 0 ]] ; then
		if [[ -d ${base}/${ddir} ]] ; then
			if [[ ! -f ${dprog}.dist ]] ; then
				$debug /bin/mv ${dprog} ${dprog}.dist
				$debug /bin/cp -p ${dprog}.dist ${dprog}
			fi
			$debug /bin/cp ${sprog} ${dprog}
		else
			links=$(/bin/ls -dl ${dprog} | awk ' { print $2; } ' -)
			if [[ $links -eq 1 ]] ; then
				if [[ ! -f ${dprog}.dist ]] ; then
					$debug /bin/mv ${dprog} ${dprog}.dist
					$debug /bin/cp -p ${dprog}.dist ${dprog}
				fi
				$debug /bin/cp ${sprog} ${dprog}
			fi
		fi
	else
		if [[ -f ${dprog}.dist ]] ; then
			$debug /bin/mv -f ${dprog}.dist ${dprog}
		fi
	fi
}

while [[ $# -gt 0 ]] ; do
	case $1 in
	undo)
		undo=1
		;;
	-f)
		debug=
		;;
	-d)
		debug=echo
		;;
	esac
	shift
done

case $(pwd) in
*/SunOS5)
	;;
*/SunOS5/*)
	exit 1
	;;
*)
	cd SunOS5
	;;
esac
cpu=`uname -p`
cpudir=${cpu}-`uname -r`

if [[ -d ${cpudir}/amd64 ]] ; then
	big=amd64
fi
if [[ -d ${cpudir}/sparcv9 ]] ; then
	big=sparcv9
fi
if [[ -d ${cpudir}/i86 ]] ; then
	small=i86
fi
if [[ -d ${cpudir}/sparc ]] ; then
	small=sparc
fi
echo "$cpudir.$big.$small."

if [[ -n ${big} ]] ; then
	for i in ipf:ipf.exe ipfs ipfstat ipmon ipnat ippool; do
		update $SBIN ${big}:${big} $i
	done
	update /usr/lib/ipf ${big}:${big} ipftest
	update /usr/kernel/drv ${big}:${big} ipf
fi
if [[ -n ${small} ]] ; then
	for i in ipf:ipf.exe ipfs ipfstat ipmon ipnat ippool; do
		update $SBIN ${small}:${small} $i
	done
	update /usr/lib/ipf ${small}:${small} ipftest
	update /usr/kernel/drv ":" ipf
fi
if [[ -z ${small} && -z ${big} ]] ; then
	if [[ -z ${small} ]] ; then
		case ${cpu} in
		i386)
			small=i86
			;;
		sparc)
			small=sparc
			;;
		esac
	fi
	for i in ipf:ipf.exe ipfs ipfstat ipmon ipnat ippool; do
		update $SBIN :${small} $i
	done
	update /usr/lib/ipf :${small} ipftest
	update /usr/kernel/drv :${small} ipf
fi

cpudir=..
for i in ip_compat.h ip_fil.h ipl.h ip_nat.h ip_state.h ip_sync.h ip_scan.h \
	 ip_pool.h ip_lookup.h; do
	update /usr/include/netinet : $i
	update /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/include/netinet/ : $i
done
exit 0
@
