Here is the MAKEflop script======================================== # # PURPOSE: This is the general purpose MAKEflop script for the 3B[12] STORE # it is used to create installable floppies of new packages for the 3B1, # 3B2 and 386 UNIX systems # # CREATED: 10/14/96 by George F. Hamstra # MODIFIED: 4/1/98 by George F. Hamstra - added 386/Intel cases # # This should be the only variable that needs adjusting - adapt for the # package name but keep it under 10 characters as it is necessary to append # "+IN" and if compressed (or zipped) a ".[Zz]" PKGNAME="WORDFIND" # Determine system type if mc68k # a 3B1 (aka UNIX/PC) system? then U3B=1 CDEV=rfp021 BDEV=fp021 elif u3b2 # a 3B2 System? then U3B=2 CDEV=rifdsk06 BDEV=ifdsk06 elif i386 # an Intel version? (assumes 3.5" drive A!!!) then U3B=3 CDEV=rdsk/f0 BDEV=dsk/f0 else echo "$0: Cannot determine machine type - terminating!" exit 1 fi CDEV="/dev/$CDEV" BDEV="/dev/$BDEV" export PKGNAME CDEV BDEV CHKMNT # # Just to be safe we will attempt an unmount, if it fails we are # if it succeeds there is a potential problem with a diskette that # was left in the drive. # CHKMNT=`/etc/umount $BDEV 2>&1` if [ "$CHKMNT" = "" ] # Diskette present!!!!! then echo "\n\n$0: Determined a previously mounted filesystem on $BDEV" echo "The filesystem has been unmounted. Place the correct diskette" echo "in the drive and re-run this procedure!\n\n" exit 1 fi # # All of the specifics necessary for creating a new 3B2 diskette # Assumes diskette 0 # U3B2_RTN() { # 3B2 installables are from a formatted disk with a UNIX # filesystem, that have been labellled "install" if [ "$1" = "-f" -o "$it" = "f" -o "$it" = "-f" ] then /etc/fmtflop -v $CDEV if [ "$?" != "0" ] then echo "\n\n$0: FORMAT failure on $CDEV - $0 terminating!\n\n" exit 99 fi FS_SIZE=1440 MAKE_LABEL fi MNT_COPY } # # All of the specifics necessary for creating a new Intel UNIX diskette # Assumes a 3.5" disk as drive 0. # I386_RTN() { # I386 installables are from a formatted disk with a UNIX # filesystem, that have been labellled "install" if [ "$1" = "-f" -o "$it" = "f" -o "$it" = "-f" ] then /bin/format -v $CDEV if [ "$?" != "0" ] then echo "\n\n$0: FORMAT failure on $CDEV - $0 terminating!\n\n" exit 105 fi FS_SIZE=2879 MAKE_LABEL fi MNT_COPY } # # MAKE_LABEL makes a properly sized filesystem and labels the media # with the proper name. I decided to redirect all of the standard # and error output since there is so much from these commands, and # since I am checking the exit status - if you have problems - change it! # MAKE_LABEL() { echo "Making new filesystem...." 2>&1 > /dev/null /etc/mkfs $CDEV $FS_SIZE 2>/dev/null if [ "$?" != "0" ] then echo "\n\n$0: MKFS failure on $CDEV - $0 terminating!\n\n" exit 100 fi echo "Labeling new filesystem...." 2>&1 > /dev/null /etc/labelit $CDEV install install if [ "$?" != "0" ] then echo "\n\n$0: LABELIT failure on $CDEV - $0 terminating!\n\n" exit 101 fi echo "Checking new filesystem...." /etc/fsck -y $CDEV 2>&1 > /dev/null if [ "$?" != 0 ] then echo "\\n$0: FSCK detected problems on $CDEV - $0 terminating!\n\n" exit 102 fi } # # MNT_COPY mounts the filesystem and copies the files to the # filesystem. This function can be called if the diskette # has been pre-formatted. umounting properly ensures no file damage # MNT_COPY() { /etc/mount $BDEV /install if [ "$?" != "0" ] then echo "\n\n$0: MOUNT failure on $BDEV - $0 terminating!\n\n" exit 103 fi /bin/cat Files|/bin/cpio -pdmuvcl /install if [ "$?" != "0" ] then echo "\n\n$0: CPIO failure to /install - $0 terminating!\n\n" exit 104 fi /etc/umount $BDEV if [ "$?" != "0" ] then echo "\n\n$0: UMOUNT failure on $BDEV - $0 terminating!\n\n" exit 105 fi exit 0 } echo "Calculating package size for $PKGNAME....." > Size /bin/cat Files | while read files do /bin/du -a $files; done|/usr/bin/awk 'BEGIN {X=0}{X+=$1}END{print X}' > Size echo "\nTotal blocks required for $PKGNAME = `/bin/cat Size`\n" /bin/ln Size SPACE 2>/dev/null echo "Insert floppy disk and press return (q=quit, f=format first): \c" read it if [ "$it" = "q" ] then exit 2 fi # # Usually /dev/rdiskette and /dev/rifdsk06 are linked, but the 3B2 # install package uses rifdsk06, so it is used here as the preferred # device for consistency purposes. But, just in case it doesn't # exist we also check for /dev/rdiskette - raw is necessary for # multiple volume packages and formatting! # case $U3B in 1) /etc/iv -i $CDEV /usr/lib/iv/FD10nl /bin/cat Files | /bin/cpio -ocB > $BDEV ;; 2) U3B2_RTN ;; 3) I386_RTN ;; *) echo "$0: Unable to determine output device type - terminating!" exit 3 esac exit 0 =====================snip-snip-snip======================================== Here is the Install scipt that is a link to INSTALL======================== # This package is based upon THE STORE concept orginally designed # for the AT&T UNIX PC. The 3B2 uses INSTALL as its installation # script, # while the 3B1 uses Install. I have added to both to # make them work # in a similar fashion. The 386 store is the # generic residence for AT&T Intel UNIX software. # # =================================================================== # First a disclaimer - THE 3B2 STORE is not supported software! # - THE 3B1 STORE is not supported software! # - THE 386 STORE is not supported software! # =================================================================== # THE 3B1/3B2/386 STORE[s] are maintained and operated by # George F. Hamstra 9/10/96 # hostage@cnote.chi.il.us 1630-257-3087 # =================================================================== # export INSPATH STORE PKGNAME FROMDIR ORDER LAST MNTNAME MNTDEV INSFILES U3B export FREE_SPACE PACKAGE BIN UBIN TARGET_DIR PKG UA # # First determine the type of system we are on 3B1 or 3B2 # if mc68k # Test for a UNIX/PC then U3B=1 UA=${UA:=/usr/lib/ua} MNTDEV=${1:-"/dev/fp021"} MNTNAME=${2:-"/tmp"} INSPATH=${3:-"/tmp/install"} INSFILES=${4:-"INSFILES"} elif u3b2 # Test for a 3B2 then U3B=2 MNTDEV=${1:-"/dev/SA/diskette"} MNTNAME=${2:-"/install"} INSPATH=${3:-"/install/install"} INSFILES=${4:-"INSFILES"} # Test for Intel platform - this test MUST be last, as well # as any tests for systems of newer origin. The reason is that # i386 does not exist on the UNIX/PC, so the test will fail. # Since he mc68k test is first the other cases are ignored. An # alternative would be to test and see if i386 exists and is # executable, but this seems to work well.... for now.... elif i386 then U3B=3 MNTDEV=${1:-"/dev/dsk/f0"} MNTNAME=${2:-"/install"} INSPATH=${3:-"/tmp/install"} INSFILES=${4:-"INSFILES"} else echo "\n\n$0: CANNOT DETERMINE SYSTEM TYPE - TERMINATING!\n\n" exit 9 fi if [ ! -d "$MNTNAME" ] then echo "\n\nNO MOUNT POINT! $MNTNAME - TERMINATING!!\n\n" exit 9 fi if [ ! -b "$MNTDEV" ] then echo "\n\nNO MOUNT DEVICE! $MNTDEV - TERMINATING!!\n\n" exit 9 fi BIN=/bin UBIN=/usr/bin TARGET_DIR=/usr/games # Adjust as necessary.... FROMDIR=`pwd` # Remember where we came from if [ "$U3B" = "2" -o "$U3B" = "3" ] then cd ${MNTNAME} # Change to the work area fi PACKAGE="wordfind" PKG="$PACKAGE" PKGNAME=`$BIN/cat usr/options/${PKG}.name` ORDER=`$BIN/cat ORDER` LAST=`$BIN/cat LAST` # # Get the display garbage out of the way in one loop # We only display 12 lines at time since we may be running in a window # on the UNIX/PC (or the 3B2 if I ever finish the UA for it......) # for files in disclaim NEWSFILE README COPYRIGHT do if [ -s "${files}" ] then $UBIN/tput clear if [ -x $UBIN/pg ] then $UBIN/pg -12 "${files}" elif [ -x $UBIN/more ] then $UBIN/more -12 "${files}" else $BIN/cat "${files}" fi echo "\n[RETURN] to continue. \c" read it $UBIN/tput clear fi done echo " Common Installation script for 3B2's, UNIX/PC's & AT&T Intel platfroms: Copyright (c) 1996, 1997, 1998 - George F. Hamstra All Rights Reserved. " echo " Installing $PKGNAME `$BIN/cat VER` ...... " if [ "$U3B" = "2" -o "$U3B" = "3" ] then cd ${MNTNAME} fi # We use the new file: INSFILES to determine the files to actually be # installed. This avoids the problem with files like: # Install, Files, Name, Size, etc. being installed in the root directory. # The format of Files and INSFILES is identical, so it is easy to create # an INSFILES from Files. # # To make things more "global", only files that are common to ALL # environments are set in INSFILES, anything special can be processed # below (due to the fact that the UNIX/PC uses /usr/lib/ua for stuff! # # This is where all the work gets done from! # We locate and install all the files found in INSFILES # $BIN/find `$BIN/cat $INSFILES` -print | $BIN/cpio -pdlmucv / 2>/dev/null #====================================================================== # Special processing required only on the UNIX/PC #====================================================================== if [ "$U3B" = "1" ] then $BIN/cp usr/lib/ua/Word_Topics $UA echo "Updating special Office files." if [ ! -s $UA/Toybox ] then > $UA/Toybox 2>/dev/null $BIN/chmod 664 $UA/Toybox 2>/dev/null fi $UBIN/uaupd -r "$PACKAGE" -a Toybox.wf Toybox $UBIN/uaupd -r Toybox -a Office Office fi #====================================================================== # End UNIX/PC Special Processing #====================================================================== # # Say goodnight # if [ "$U3B" = "1" ] then $UBIN/message -i "The $PKGNAME has been installed" elif [ "$U3B" = "2" -o "$U3B" = "3" ] # The i386 will allow 3B2 style installs then echo "\n\nThe $PKGNAME has been installed\n\n" fi cd $FROMDIR ========================================================================snip