home *** CD-ROM | disk | FTP | other *** search
- #ident "@(#)i_exit 17.7 98/08/05"
- #copyright "%c%"
- #!/sbin/sh
-
- #
- # This script is invoked by pkgadd, just before exit.
- # At present, all the checking it does is for update 701.
- #
- # When the update is installed, for each package updated (where the list of
- # packages is defined by 'CLASSES' below), a file called 'uw7u1p'
- # is created in the /var/sadm/pkg/${pkg} directory. The creation time of
- # these files will reflect the time that the update was installed. For
- # subsequent invocations of pkgadd, i_exit checks to see if the pkginfo
- # file for each package is now more recent than the corresponding uw7u1p
- # file. If so, the update needs to be reapplied. If a new package that the
- # update touches is added after the update has been installed, i_exit will
- # still prompt the user to reapply the update because the 'find' command
- # will exit with a non-zero status which will set the NEEDS_UPDATE variable.
-
-
- CLASSES="acp audit base bsdcompat cmds dele esle frle i2oOSM inet jale lp ls mpio netbios netmgt nfs nis nsnavAu nsu nuc nwsrvr nwnet osmp ppp rpc scoadmin scohelp uccs ucplus uedebug usoftint ustdcomps vxvm TEDdesk TEDljpe TEDdincl TEDles TEDlogin TEDlde TEDlfr vtclrun"
-
- # 4/8/98 jillp
- # Note - crypt and nics removed from the list of classes above:
- # The crypt package will only be installable on top of update1 and adds
- # functionality. After installing crypt, the user should not see the message
- # to reinstall the update.
- # Likewise, later nics packages will be installed on top of the update,
- # adding new hardware drivers. These won't back rev what the update
- # installed so there is no need to show the message asking the user to
- # reapply the update.
-
- NEEDS_UPDATE=""
- cd /var/sadm/pkg
- for pkg in ${CLASSES}
- do
- [ -f ${pkg}/pkginfo -a \
- ! -f ${pkg}/!I-Lock! -a ! -f ${pkg}/!R-Lock! ] || continue
- NEEDS_UPDATE=`/usr/bin/find ${pkg}/pkginfo -newer \
- ${pkg}/update701 2>/dev/null || echo true`
- [ "$NEEDS_UPDATE" != "" ] && break
- done
-
- [ "$NEEDS_UPDATE" = "" ] && exit 0
- echo "\nWARNING: UnixWare Update 7.0.1 should be reapplied\n" >&2
- /usr/bin/sleep 5
-