3 # First parameter: Root path that will be removed
4 # MY_ROOT=/export/home/is/root
6 if [ $# -ne 1 -o -z "$1" ]
8 echo "One parameter required"
10 echo "1. parameter: Path to the local root directory"
11 echo "All packages in local database will be removed!"
20 GETUID_SO
=/tmp
/getuid.so.$$
22 tail +$linenum `basename $0` > $GETUID_SO
24 PKGLIST
=`pkginfo -R $MY_ROOT | cut -f 2 -d ' ' | grep -v core`
25 COREPKG
=`pkginfo -R $MY_ROOT | cut -f 2 -d ' ' | grep core`
26 COREPKG01
=`pkginfo -R $MY_ROOT | cut -f 2 -d ' ' | grep core01`
28 echo "#############################################"
29 echo "# Deinstallation of Office packages #"
30 echo "#############################################"
32 echo "Path to the root directory : " $MY_ROOT
34 echo "Packages to deinstall:"
35 for i
in $PKGLIST $COREPKG; do
39 INSTALL_DIR
=$MY_ROOT`pkginfo -R $MY_ROOT -r $COREPKG01`
41 # Restore original bootstraprc
42 mv -f $INSTALL_DIR/program
/bootstraprc.orig
$INSTALL_DIR/program
/bootstraprc
44 for i
in $PKGLIST $COREPKG; do
45 LD_PRELOAD
=$GETUID_SO /usr
/sbin
/pkgrm
-n -R $MY_ROOT $i
48 # Removing old root directory, very dangerous!
51 # removing library in temp directory
55 echo "Deinstallation done..."