#!/bin/sh

[ -r /etc/debian_version ] && debian=1
[ -r /etc/lsb-release ] && grep -q Ubuntu /etc/lsb-release && debian=1

if test x$debian = x1; then
  pkglist=`dpkg -l |grep -e rtSupCP -e cprocsp|awk '{print $2}'`
  if test -n "$pkglist"
  then
    dpkg -P $pkglist
  fi
  exit $?
else
  pkglist=`rpm -qa |grep -e rtSupCP -e cprocsp`
  if test -n "$pkglist"
  then
    rpm -e $pkglist
  fi
  exit $?
fi
