#!/bin/sh
#
# Install DiskSuite on a 9.0 Athena machine
# kolya@mit.edu, Apr 2002

umask 022
if [ -h /etc/opt ]; then
  echo "*** /etc/opt is a symlink, removing .. "\\c
  /bin/rm -f /etc/opt
  echo done
fi
echo "*** Copying pkgadd utilities from AFS .. "\\c
OS="/afs/athena.mit.edu/system/@sys/os"
if [ -h /usr/sbin/pkgadd ]; then
  /bin/rm -f /usr/sbin/pkgadd
  cp ${OS}/usr/sbin/pkgadd /usr/sbin/pkgadd
fi
if [ -h /usr/sadm ]; then
  /bin/rm -f /usr/sadm
  mkdir /usr/sadm
  (cd ${OS}/usr/sadm ; tar -cf - .) | (cd /usr/sadm ; tar -xf -)
fi
echo done
echo "*** Installing SUNWmdr, SUNWmdu, SUNWmdx"
cd /afs/sipb.mit.edu/service/solaris/packages/DiskSuite-4.2.1-sparc
/usr/sbin/pkgadd -d `pwd` SUNWmdr SUNWmdu SUNWmdx
echo "*** Package installation finished, fixing /etc permissions .. "\\c
chmod g-w /etc
echo done
