#!/bin/sh # # this script will backout properly newly delivered files # and will use package [ir].script for actual delivery (backout) # located in $SYSTEM_SCRIPTS # # S10: patch 119042-09 (i386: 119043-09) are needed for r.manifest work properly # patch 121901-01 (i386: 121902-01) which is delivering [ir].manifest # # @(#) u.manifest 1.8 @(#) 07/07/10 # ERROR=0 SYSTEM_SCRIPTS="$PKG_INSTALL_ROOT/usr/sadm/install/scripts" PROGNAME=`basename $0` # Since this is generic, figure out the class. Class=`echo $PROGNAME | /bin/nawk ' { print substr($0, 3) }'` if [ ! -x "$SYSTEM_SCRIPTS/i.$Class" -o ! -x "$SYSTEM_SCRIPTS/r.$Class" ]; then # Something wrong here, system CAS are not executable :( ERROR=100 else while read src dst ; do # strip .sejadelete from the name realdst="`echo $dst| /bin/sed -e \"s/[.]${ACTIVE_PATCH}[.]sejadelete$//;\"`" if [ "$realdst" != "$dst" ]; then # we have detected removal of newly inserted file :) echo "$realdst" | "$SYSTEM_SCRIPTS/r.$Class" # copy file there, otherwise it will fail.... cp $src $dst _err=$?; if [ $_err -gt 0 ]; then ERROR=$_err; fi else ## revert to previous xml file (restored by patchrm) echo $src $dst | "$SYSTEM_SCRIPTS/i.$Class" _err=$?; if [ $_err -gt 0 ]; then ERROR=$_err; fi fi done fi #if [ $ERROR -eq 0 ]; then # exit $ERROR #else exit 0 #fi