#!/bin/sh
#
# Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
# Use is subject to license terms.
#
# ident	"@(#)S34_fix_inittab.sh	1.1	08/05/06 SMI"
#

# The unbundled Sun Remote Services (SRS) product adds entries to the
# inittab.  SRS cannot run within a zone so we attempt to remove any of
# these entries that might possibly be present.
#
# As part of the p2v module interface there are environment variables set for
# this script (e.g. FILEDIR - path to brand-specific file repository).
# See the p2v script for a full list of variables.
#

if [ -f /etc/inittab.pre_p2v ]; then
	exit 0
fi

cp /etc/inittab /etc/inittab.pre_p2v

sed -e '/SUNWsrspx/d
	/SUNWsrshp/d
	/SUNWsrsas/d
	/SUNWsrsvp/d
	/SUNWsrstp/d
' /etc/inittab >/tmp/inittab.$$

mv /tmp/inittab.$$ /etc/inittab
