#!/sbin/sh
#
########
#  Product: VIDEOOUT
#  Fileset: VIDEOOUT
#  VIDEOOUT preinstall
########
# preinstall removes old 10.20 products
########
#
# (c) Copyright Hewlett-Packard Company, 2000
#
########
#

	# Get the utilities I'll need
PROD_UTILS=${SW_ROOT_DIRECTORY}usr/lbin/sw/control_utils
if [[ ! -f $PROD_UTILS ]]
then
   echo "ERROR:  Cannot find $PROD_UTILS"
   exit 1
fi

. $PROD_UTILS

VIDEO_DIR="/opt/videoout"

if [[ -d $VIDEO_DIR ]]
   then
      chown -R bin /opt/videoout > /dev/null 2>&1
      chgrp -R bin /opt/videoout > /dev/null 2>&1
      chmod 555 /opt/videoout/dt/appconfig/appmanager/C/VideoOutput
      ##swmodify -x files='/opt/videoout/dt/appconfig/appmanager/C/VideoOutput' VideoOut.VIDEOOUT
fi

BUNDLE_LIST="A4248A_APZ A4248B"
for BUNDLE in $BUNDLE_LIST
  do
   swlist -l bundle $BUNDLE  > /dev/null 2>&1
   if [[ $? -eq 0 ]]
      then
       swremove $BUNDLE
   fi
done
exit 0
