# sysvinit-inittab - postinst
# run this on the target
if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then
	tmp="115200;ttyPS0 115200;hvc0"
	for i in $tmp
	do
		j=`echo ${i} | sed -e s/^.*\;//g -e s/\:.*//g`
		k=`echo ${i} | sed s/^.*\://g`
		if [ -z "`grep ${j} /proc/consoles`" ]; then
			if [ -z "${k}" ] || [ -z "`grep ${k} /proc/consoles`" ] || [ ! -e /dev/${j} ]; then
				sed -i -e /^.*${j}\ /d -e /^.*${j}$/d /etc/inittab
			fi
		fi
	done
	kill -HUP 1
else
	if [ "115200;ttyPS0 115200;hvc0" = "" ]; then
		exit 0
	else
		exit 1
	fi
fi