[comp.unix.xenix] How to load AT&T 6300 Plus packages to generic UNIX V.3

domo@riddle.UUCP (Dominic Dunlop) (12/05/87)

[If there's a Microport newsgroup, it doesn't come here]

				Background

AT&T's generic UNIX V.3 for the 80386 (as sold in binary form by AT&T,
Bell Technologies, Intel, Interactive Systems, Microport, Prime etc.)
will run binaries created for UNIX V.2 on the 80286.  A large number of
packages exists for AT&T's 6300 Plus, an 80286-based system running V.2.
These can be run on 80386-based systems while you're waiting for
software authors to come up with native 80386 ports of their products.

				Problem

You are supposed to load packages onto your 6300 Plus using the system's
administration procedures.  These handle weird multi-volume cpio diskette
sets, which are a pig to load unless you have the installation software.
Which you don't if you're trying to load the software onto an 80386-based
system running 386/ix, Microport, or whatever.

				Solution

Here's a shell script which does the job.  If you want to know the details,
it reads 350k, starting at offset 9k, from each 360k diskette in the
installation set, piping the result into cpio -c.  It the fires off the
Install program which should be part of the application package.  As the
comments remark, there's not a lot of error checking, as it's essentially
a quick hack.  Also, testing is about at the ``worked twice in a row''
level.  Despite all that, I hope it's useful to somebody out there.

Dominic Dunlop
domo@sphinx.co.uk  domo@riddle.uucp

++++cut here++++++++cut here++++++++cut here++++++++cut here++++
:
# load_script
#
#   Shell script to load software packages delivered in AT&T PC
#   6300+ UNIX V.2 format on systems where the PC 6300+
#   installation procedure is not available (eg 386/ix).
#   The script can be executed by any user who can read the raw
#   diskette device.  However, the root password is requested
#   before files are moved to their final destinations if this
#   script is not run by the super-user.
#
#   Note that this script does NOT check that sufficient space is
#   available to load the package.  In general, your /usr file
#   system should have at least (700 * diskettes_in_package)
#   blocks free before installation.  Note also that there is no
#   check that the diskettes are in the correct format, or that
#   they are inserted in the correct order.
#
# 871204 DFD	Created

# Change the following device assignment if the 360kB raw
# diskette device on your system has a different name.
DEV=${DEV-/dev/rdsk/f0d9dt}

if [ ! -r $DEV -o ! -c $DEV ]
then
	 cat << E_O_F
Can't read $DEV.  Check raw diskette device name and/or your
access permissions.
E_O_F
exit 1
fi

cd /usr/tmp
mkdir install 2>/dev/null
cd install
IT="the first diskette of the package"

trap "echo Installation aborted.; rm -r /usr/tmp/install; exit 1" 2 15
(
	while echo "Insert $IT and hit return >\c" 1>&2  \
		&& read ANS
	do
		IT="next diskette"
		echo "The following files are being loaded:" 1>&2
		dd if=$DEV ibs=1k obs=5k skip=9 count=350 2>/dev/null
	done
) | cpio -icvmudB 1>&2

chmod +x Install

trap 2 15

cat << E_O_F
Files read from diskettes.  You may remove the last diskette from
the drive.  If you are not already logged in as the super-user,
Please enter the root password to continue with installation.
E_O_F
if su root -c ./Install
then
	cat << E_O_F
Installation complete.  You should execute
	rm -r /usr/tmp/install
to remove installation scratch files at a convenient time.
E_O_F
else
	cat << E_O_F
Installation failed.  To retry,
	su
	cd /usr/tmp/install
	./Install
E_O_F
fi

dave@westmark.UUCP (Dave Levenson) (12/16/87)

In article <522@riddle.UUCP>, domo@riddle.UUCP (Dominic Dunlop) writes:
...
> it reads 350k, starting at offset 9k, from each 360k diskette in the
> installation set, ...
...

Most of the packages released for the AT&T PC6300PLUS are shipped on
1.2 Mbyte "high density" floppies, not 360-k "double-density"
floppies.  The solution presented will also handle these if the
diskette size-dependent parameters are adjusted accordingly.
-- 
Dave Levenson
Westmark, Inc.		A node for news.
Warren, NJ USA
{rutgers | clyde | mtune | ihnp4}!westmark!dave