thad@cup.portal.com (Thad P Floryan) (01/14/91)
If anyone is still passing out copies of the s4diag.cpio.Z from July 1989, please replace the "Install" file in that archive with the enclosed Install.new which features: - correction to my stoopid error using FD10nl instead of FD10sl to "iv" for formatting the floppy - error correction and retry on the floppy formatting itself Thad Floryan [ thad@cup.portal.com ] ---- Cut Here and feed the following to sh ---- #!/bin/sh # This is a shell archive (produced by shar 3.49) # To extract the files from this archive, save it to a file, remove # everything above the "!/bin/sh" line above, and type "sh file_name". # # made 01/14/1991 06:50 UTC by thad@thadlabs # Source directory /u/thad/temp # # existing files will NOT be overwritten unless -c is specified # # This shar contains: # length mode name # ------ ---------- ------------------------------------------ # 3073 -rw-r--r-- Install.new # if touch 2>&1 | fgrep 'amc' > /dev/null then TOUCH=touch else TOUCH=true fi # ============= Install.new ============== if test -f 'Install.new' -a X"$1" != X"-c"; then echo 'x - skipping Install.new (File already exists)' else echo 'x - extracting Install.new (Text)' sed 's/^X//' << 'SHAR_EOF' > 'Install.new' && X# Install script for new s4 diagnostics for WD2010 chip and/or P5.1 motherboar d X# X# Script: X# X# 1. formats a blank floppy to 10 sectors/track X# 2. makes a mountable file system on the formatted floppy X# 3. mounts the newly formatted floppy X# 4. copies the new s4diag program to the formatted floppy X# 5. ln's s4diag to unix on the formatted floppy X# 6. checksums (method 1) the s4diag program X# 7. checksums (method 2) the s4diag program X# 8. assures owner, group and protections are set properly X# 9. unmounts the formatted floppy X# X# Use: X# X# 1. su (as root) X# 2. put a blank floppy disk into the floppy drive X# 3. be sure the new s4diag exists in the directory from which you're X# running this script X# 4. sh Install (i.e. execute this Install script file) X# 5. be SURE the checksums agree with the accompanying documentation X# 6. put write protect tab over the disk's cutout X# 6. use the new diagnostic software as required. X# X# This script by Thad Floryan, 1-July-1989, with thanks to the MANY people X# who offered "improvements" to the technique I used in my recently-posted X# "kshpr" regarding determining whether one is su'd root or not. X# X# Updated 13-Jan-1991 to initialize the floppy with a loader using FD10sl X# instead of FD10nl (dumb error!) and to verify no errors formatting. X# Xif test ! -r "./s4diag" Xthen X echo "Missing 's4diag'; script aborted." X exit 1 Xfi X# Xset `id` Xif test "$1" != "uid=0(root)" Xthen X echo "You must 'su' because of the ch{own|grp|mod} at the end." X echo "Script aborted." X exit 1 Xfi X# Xecho "Insert a blank floppy disk and press the RETURN key: \c" Xread DUMMY X# X# Check if /usr/adm/unix.log exists and, if so, gets its size (or dummy) X# Xif test -r "/usr/adm/unix.log" Xthen X set -- `ls -l /usr/adm/unix.log` X startsize=$5 Xelse X startsize="0" Xfi X# Xecho "Starting the floppy format." Xiv -i /dev/rfp020 /usr/lib/iv/FD10sl X# X# Check if /usr/adm/unix.log exists and gets its size (or a dummy) X# Xif test -r "/usr/adm/unix.log" Xthen X set -- `ls -l /usr/adm/unix.log` X endsize=$5 Xelse X endsize="0" Xfi X# X# If sizes are not the same, try one final time aborting if failed again X# Xif [ "$startsize" != "$endsize" ] Xthen X echo "Presumed errors during formatting, trying one final time" X echo "Starting the floppy format." X startsize="$endsize" X iv -i /dev/rfp020 /usr/lib/iv/FD10sl X if test -r "/usr/adm/unix.log" X then X set -- `ls -l /usr/adm/unix.log` X endsize=$5 X else X endsize="0" X fi X if [ "$startsize" != "$endsize" ] X then X echo "Formatting errors again, aborting" X exit 1 X fi Xfi Xecho "Ignore the 'It is safe to remove the floppy diskette.' message." Xmkfs /dev/rfp021; dismount -f X# Xecho "Mounting floppy filesystem." Xmount /dev/fp021 /mnt X# Xecho "Copying s4diag to floppy." Xcp ./s4diag /mnt/ X# Xecho "Linking s4diag to unix." Xln /mnt/s4diag /mnt/unix X# Xecho "Checksums of s4diag on floppy:" Xsum /mnt/s4diag Xsum -r /mnt/s4diag X# Xecho "Setting owner, group and protections." Xchown root /mnt/s4diag; chgrp root /mnt/s4diag; chmod 555 /mnt/s4diag X# Xumount /dev/fp021 Xecho "Remove the floppy disk and affix a write-protect tab." Xexit 0 SHAR_EOF $TOUCH -am 0113075891 'Install.new' && chmod 0644 Install.new || echo 'restore of Install.new failed' Wc_c="`wc -c < 'Install.new'`" test 3073 -eq "$Wc_c" || echo 'Install.new: original size 3073, current size' "$Wc_c" fi exit 0