Re: De-Installing Informix SE
Posted in 1995
>Date: Wed, 5 Apr 1995 09:05:29 -0500
>From: Clem Akins <cwakins@leia.alloys.rmc.com>
>X-Informix-List-Id: <list.5893>
>
>From: alexmc@biccdc.co.uk (Alex McLintock)
>Subject: De-Installing Informix SE
>
>> So how do you De-Install Informix SE from a Unix box?
>>
>> simply rm -rf * in the /usr/informix directory?
>
>That's a start. Let's see how many more things we can think up...
> Remove the data files.
> Delete informix from /etc/passwd.
> Delete the informix group from /etc/group.
> Change back any kernel parameters (semaphores, etc).
> Basically RTF installation M, and undo what it says to do.
>
>Now for the less obvious...
> Grep for INFORMIXDIR in user's code, fix/delete/re-direct.
> Were there any NFS files that it needed/provided?
> Any sockets that depend on the db being there?
> Clients that use it?
> Istar peers that have synonyms to it?
>
>Heck, maybe it's easier to re-initialize the whole box and just restore
>the things you want to keep! (Only sort of kidding here, we've *done* it.)
>
>If some of these things don't apply to SE, but only to OnLine, then sorry.
>It's been some years since I was on an SE system.
Clem's answer is excellent, but may not be answering precisely the
question. He indicates how to expunge Informix from your system entirely,
which is not the same as expunging SE and leaving everything else OK.
I attach a shell archive containing a shell script which can be used to
uninstall one or more products, leaving behind any files used by products
which are still installed -- a selective de-install for Informix products.
It has been used successfully on versions 4 through 6, but not extensively,
so there is an outside chance that there are problems with it (please let
me know if you find any).
Yours,
Jonathan Leffler (johnl@informix.com) #include <disclaimer.h>
PS: I see the the product code to file mapping code omits ISQL.
Fixing that is left as an exercise for the interested reader.
---------------------------------------------------------------------------
The ixremove command removes the files unique to a named product or
specified file list. You could remove the Tools specific files from an
INFORMIXDIR by doing:
cd $INFORMIXDIR
ixremove -F fglfiles -F fgpfiles -P id -F sqlfiles -v
This would remove all the Tools files not used by the Engines.
Options:
-n Do not execute the commands
-v Verbose: echo what the command is doing (or would do)
---------------------------------------------------------------------------
#! /bin/sh
# This is a shell archive. Remove anything before this line, then feed it
# into a shell via "sh file" or similar. To overwrite existing files,
# type "sh file -c".
# The tool that generated this appeared in the comp.sources.unix newsgroup;
# send mail to comp-sources-unix@uunet.uu.net if you want that tool.
# If this archive is complete, you will see the following message at the end:
# "End of shell archive."
# Contents: ixremove
# Wrapped by johnl@anubis on Thu Apr 6 09:04:14 1995
PATH=/bin:/usr/bin:/usr/ucb ; export PATHif test -f 'ixremove' -a "${1}" != "-c" ; then
echo shar: Will not clobber existing file \\"'ixremove'\\"
else
echo shar: Extracting \\"'ixremove'\\" \\(2587 characters\\)
sed "s/^X//" >'ixremove' <<'END_OF_FILE'
X: "@(#)ixremove.sh 1.1 95/02/13"
X#
X# Remove an Informix product from $INFORMIXDIR.
X# Does not remove any files used by products still installed.
X
Xarg0=`basename $0 .sh`
Xusage="Usage: $arg0 [-F filelist] [-P product] [-fnv]"
X
Xforce=no
Xfilelist=""
Xverbose=no
Xexecute=yes
Xprodlist=""
X
Xset -- `getopt -fnvF:P: ${@:+"$@"}`
X
Xwhile [ $# -gt 0 ]
Xdo
X case "$1" in
X --) shift
X break;;
X -f) force=yes;;
X -v) verbose=yes;;
X -n) execute=no;;
X -P) prodlist="$prodlist $2"
X shift;;
X -F) filelist="$filelist $2"
X shift;;
X *) echo "$usage" >&2
X exit 1;;
X esac
X shift
Xdone
X
Xif [ $# -gt 0 ]
Xthen
X echo "$usage" >&2
X exit 1
Xfi
X
Xif [ ! -d $INFORMIXDIR ]
Xthen
X echo "$arg0: The INFORMIXDIR 'directory' $INFORMIXDIR isn't a directory" >&2
X exit 1
Xfi
X
Xxflag=-u
Xif [ $verbose = yes ]
Xthen xflag=${xflag}v
Xfi
Xif [ $execute = no ]
Xthen xflag=${xflag}n
Xfi
X
Xfor product in $prodlist
Xdo
X product=`echo $product | tr '[A-Z]' '[a-z]'`
X case $product in
X *4gp*|*rds*) filelist="$filelist fgpfiles";;
X *4db*|*id*) filelist="$filelist fgldbfiles";;
X *4gl*|*fgl*) filelist="$filelist fglfiles";;
X *esqlc|*esql/c*) filelist="$filelist esqlfiles";;
X *online*) filelist="$filelist onlinefiles";;
X *se*|*standard*engine*) filelist="$filelist sefiles";;
X *) echo "$arg0: unrecognised product name: $product" >&2
X exit 1
X esac
Xdone
X
Xif [ -z "$filelist" ]
Xthen
X echo "$usage" >&2
X exit 1
Xfi
X
Xfiles=""
Xfor file in $filelist
Xdo
X nfile=$INFORMIXDIR/etc/`basename $file`
X if [ -r $nfile ]
X then files="$files $nfile"
X else echo "$arg0: cannot locate $nfile" >&2
X exit 1
X fi
Xdone
Xecho "$arg0: removing files listed solely in $filelist from $INFORMIXDIR"
X
Xtmp=${TMPDIR:-/tmp}/unix.$$
Xtrap "rm -f $tmp.?; exit 1" 1 2 3 13 15
X
Xls $files > $tmp.1
Xls $INFORMIXDIR/etc/*files > $tmp.2
Xremainder=`comm -13 $tmp.1 $tmp.2`
X
Xstreamline(){
Xsed -e 's/#.*//' \\
X -e '/^[ ]*$/d' \\
X -e '/^PRODUCT/d' \\
X -e '/^NAME/d' \\
X -e 's/[ ][ ]*/ /g' $*
X}
X
Xstreamline $files | sort -u >$tmp.1
Xstreamline $remainder | sort -u >$tmp.2
X
Xcomm -23 $tmp.1 $tmp.2 |
X{
Xdirlist=""
Xwhile read file owner group perms link linkfile junk
Xdo
X ixfile=$INFORMIXDIR/$file
X if [ "$link" = REMOVE ]
X then : Ignore REMOVE files -- should not exist anyway!
X elif [ -f $ixfile ]
X then echo "rm -f $ixfile"
X elif [ -d $ixfile ]
X then dirlist="$ixfile $dirlist"
X else echo "$arg0: warning $ixfile not found" >&2
X fi
Xdone
X# Remove directories (ignoring errors)
Xif [ -n "$dirlist" ]
Xthen echo "rmdir $dirlist >/dev/null 2>&1"
Xfi
X} |
Xsh ${xflag}
X
Xrm -f $tmp.?
END_OF_FILE
if test 2587 -ne `wc -c <'ixremove'`; then
echo shar: \\"'ixremove'\\" unpacked with wrong size!
fi
chmod +x 'ixremove'
# end of 'ixremove'
fi
echo shar: End of shell archive.
exit 0