ProDOS 8 year tables are updated for 6.0.2+, otherwise user is prompted

rewording of some prompts and renumbering of one menu
netboot GS/OS is installed with original mixed case names
DOS3.3.FST and TEACH are installed during network boot setup
Spectrum is fully installed (not just disk images)
This commit is contained in:
Ivan X 2015-12-07 23:52:00 -05:00
parent a861da6bd3
commit cf075d07fd

View File

@ -14,22 +14,37 @@ case "$A2SERVER_SCRIPT_URL" in
esac
gsosDir="/media/A2SHARED/A2FILES"
imagesDir=$gsosDir/GSOS.INSTALLER/IMAGES
imageToolsDir=$gsosDir/GSOS.INSTALLER/IMAGE.TOOLS
netInstallDir=$gsosDir/GSOS.INSTALLER/NET.INSTALL
imagesDir=$gsosDir/GSOS.Installer/Images
imageToolsDir=$gsosDir/GSOS.Installer/Image.Tools
netInstallDir=$gsosDir/GSOS.Installer/Net.Install
p8Dir="/media/A2SHARED/A2FILES"
diskToolsP8Dir=$p8Dir/DISK.TOOLS.P8
diskToolsP8Dir=$p8Dir/Disk.Tools.P8
commDir="/media/A2SHARED/A2FILES/COMM"
spectrumDir=$commDir/SPECTRUM
protermDir=$commDir/PROTERM
zlinkDir=$commDir/Z.LINK
adtproDir=$commDir/ADTPRO
commDir="/media/A2SHARED/A2FILES/Comm"
spectrumDir=$commDir/Spectrum
protermDir=$commDir/ProTERM
zlinkDir=$commDir/Z.Link
adtproDir=$commDir/ADTPro
gsosURL="http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Apple_II/Apple_IIGS_System_6.0.1/"
gsosBackupURL="http://archive.org/download/download.info.apple.com.2012.11/download.info.apple.com.2012.11.zip/download.info.apple.com%2FApple_Support_Area%2FApple_Software_Updates%2FEnglish-North_American%2FApple_II%2FApple_IIGS_System_6.0.1%2F"
updateP8YearTables () {
# Geoff Body and Andrew Roughan helped Joseph Carter with this one
# Update ProDOS 8 year table (and spalsh date because may as well)
# Effectively, we're turning p8 into the 6.0.3 version here.
wd=$PWD
cd /usr/local/etc/netatalk/a2boot
echo -n -e "\xb0\xb2\xad\xc1\xf5\xe7\xad\xb1\xb5" | sudo dd of="p8" bs=38 seek=1 conv=notrunc 2> /dev/null
echo -n -e "\x12\x11\x0b\x10\x0f\x0e\x0d" | sudo dd of="p8" bs=3958 seek=1 conv=notrunc 2> /dev/null
echo -n -e "\xb0\xb2\xad\xc1\xf5\xe7\xad\xb1\xb5" | sudo dd of="ProDOS16 Image" bs=3110 seek=1 conv=notrunc 2> /dev/null
echo -n -e "\x12\x11\x0b\x10\x0f\x0e\x0d" | sudo dd of="ProDOS16 Image" bs=7030 seek=1 conv=notrunc 2> /dev/null
echo -n -e "\xb0\xb2\xad\xc1\xf5\xe7\xad\xb1\xb5" | sudo dd of="Apple :2f:2fe Boot Blocks" bs=79 seek=1 conv=notrunc 2> /dev/null
echo -n -e "\x12\x11\x0b\x10\x0f\x0e\x0d" | sudo dd of="Apple :2f:2fe Boot Blocks" bs=7071 seek=1 conv=notrunc 2> /dev/null
cd "$wd"
}
# bail out on automated netboot setup unless -b is also specified
[[ -f /tmp/a2server-autoAnswerYes ]] && autoAnswerYes=1 || autoAnswerYes=
if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
@ -85,15 +100,6 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
echo -n -e "\x20\x7d\x14" | sudo dd of='ProDOS16 Image' bs=864 seek=1 conv=notrunc 2> /dev/null
echo -n -e "\xad\x00\xc0\x29\xff\x00\xc9\xb8\x00\xd0\x06\xa9\x02\x00\x8d\x53\x14\xa9\x10\x0f\x60" | \
sudo dd of='ProDOS16 Image' bs=1661 seek=1 conv=notrunc 2> /dev/null
# Geoff Body and Andrew Roughan helped Joseph Carter with this one
# Update ProDOS 8 year table (and spalsh date because may as well)
# Effectively, we're turning p8 into the 6.0.3 version here.
echo -n -e "\xb0\xb2\xad\xc1\xf5\xe7\xad\xb1\xb5" | sudo dd of="p8" bs=38 seek=1 conv=notrunc 2> /dev/null
echo -n -e "\x12\x11\x0b\x10\x0f\x0e\x0d" | sudo dd of="p8" bs=3958 seek=1 conv=notrunc 2> /dev/null
echo -n -e "\xb0\xb2\xad\xc1\xf5\xe7\xad\xb1\xb5" | sudo dd of="ProDOS16 Image" bs=3110 seek=1 conv=notrunc 2> /dev/null
echo -n -e "\x12\x11\x0b\x10\x0f\x0e\x0d" | sudo dd of="ProDOS16 Image" bs=7030 seek=1 conv=notrunc 2> /dev/null
echo -n -e "\xb0\xb2\xad\xc1\xf5\xe7\xad\xb1\xb5" | sudo dd of="Apple :2f:2fe Boot Blocks" bs=79 seek=1 conv=notrunc 2> /dev/null
echo -n -e "\x12\x11\x0b\x10\x0f\x0e\x0d" | sudo dd of="Apple :2f:2fe Boot Blocks" bs=7071 seek=1 conv=notrunc 2> /dev/null
fi
echo "A2SERVER: Boot Blocks have been installed."
@ -101,7 +107,8 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
if [[ ! -f /usr/local/bin/mkatinit ]] \
|| [[ ! -f /usr/local/bin/afptype ]] \
|| [[ ! -f /usr/local/bin/mkvolinfo ]] \
|| [[ ! -f /usr/local/bin/afpsync ]]; then
|| [[ ! -f /usr/local/bin/afpsync ]] \
|| [[ ! -f /usr/local/bin/cppo ]]; then
rm /tmp/2.tools &> /dev/null
wget -q -O /tmp/2.tools "${scriptURL}scripts/a2server-2-tools.txt"
chmod ugo+x /tmp/2.tools
@ -110,9 +117,9 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
fi
# put BASIC.SYSTEM at root for ProDOS 8 startup
cp -p /usr/local/etc/netatalk/a2boot/Basic.System $gsosDir/BASIC.SYSTEM
cp -p /usr/local/etc/netatalk/a2boot/Basic.System $gsosDir/BASIC.System
afpsync -v $gsosDir > /dev/null
afptype -p SYS -q $gsosDir/BASIC.SYSTEM
afptype -p SYS -q $gsosDir/BASIC.System
# create tools for setting GS/OS or ProDOS 8 boot in battery RAM and rebooting. Props yet again to Geoff Body.
if [[ ! -f $p8Dir/NETBOOT.P8 ]]; then
@ -146,15 +153,15 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
gsosReinstall=
echo
echo "GS/OS is already installed on this volume."
echo "0: don't install GS/OS now"
echo "1: delete installed GS/OS, then install new GS/OS"
echo "2: install GS/OS over existing system"
echo "1: leave existing GS/OS system in place"
echo "2: delete installed GS/OS system, then install new GS/OS"
echo "3: install or upgrade GS/OS on top of existing GS/OS system"
echo
echo -n "What do you wanna do? "
echo -n "Which would you like to do? "
read
if [[ $REPLY == "1" || $REPLY == "2" ]]; then
if [[ $REPLY == "2" || $REPLY == "3" ]]; then
gsosReinstall=$REPLY
if (( $gsosReinstall == 1 )); then
if (( $gsosReinstall == 2 )); then
echo
echo -n "Are you sure you want to delete your entire GS/OS System folder? "
read
@ -196,10 +203,13 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
if [[ $REPLY == "1" || $REPLY == "2" || $REPLY == "3" ]]; then
gsosInstall=$REPLY
# get GS/OS disks from Internet Archive and put them in IMAGES
if [[ gsosInstall -gt 1 ]]; then
updateP8YearTables
fi
# get GS/OS disks and put them in IMAGES
# also dump contents into NET.INSTALL and modify scripts to work from there
# echo
# echo "Come back in a while."
echo
echo "A2SERVER: Downloading GS/OS 6.0.${gsosInstall} installer disk images..."
cd /tmp/netboot
@ -224,7 +234,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
afpsync -v $gsosDir > /dev/null
for diskname in ${diskNames[@]}; do
outfile="$imagesDir/$(tr [:lower:] [:upper:] <<< $diskname)"
outfile="$imagesDir/$diskname"
(( activeDisk++ ))
echo "A2SERVER: Disk ${activeDisk} of ${#diskNames[@]}: $diskname"
if (( $gsosInstall == 1 )); then
@ -243,7 +253,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
cppo -s -ad $outfile $netInstallDir 2> /dev/null
done
rm *.sea* &> /dev/null
sed -i "s/\([^\\]\r:\)/\1A2FILES:GSOS.INSTALLER:NET.INSTALL:/g" $netInstallDir/INSTALL/SCRIPTS/*
sed -i "s/\([^\\]\r:\)/\1A2FILES:GSOS.Installer:Net.Install:/g" $netInstallDir/Install/Scripts/*
afpsync -v $gsosDir > /dev/null
@ -254,7 +264,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
scriptEntries=$(cat $1 | tr '\r' '#' | tr '~' '\n' | sed 's/4#D/5/')
IFS=$'\n'
scriptEntries=($scriptEntries)
pathPrefix="/A2FILES/GSOS.INSTALLER/NET.INSTALL"$(tr ':' '/' <<< ${scriptEntries[0]##S*\\\\#})
pathPrefix="/A2FILES/GSOS.Installer/Net.Install"$(tr ':' '/' <<< ${scriptEntries[0]##S*\\\\#})
entryCount=${#scriptEntries[@]}
(( entryCount -= 2 ))
# echo "entryCount: $entryCount"
@ -266,8 +276,8 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
action=${scriptEntry[1]:0:1}
sourcePathMixed=$(tr ':' '/' <<< ${scriptEntry[5]})
[[ ${sourcePathMixed:0:1} != '/' ]] && sourcePathMixed="${pathPrefix}/$sourcePathMixed"
sourcePath=$(tr [:lower:] [:upper:] <<< $sourcePathMixed)
targetPath=$gsosDir/$(tr ':' '/' <<< ${scriptEntry[6]} | tr [:lower:] [:upper:])
sourcePath=$sourcePathMixed
targetPath=$gsosDir/$(tr ':' '/' <<< ${scriptEntry[6]})
# volumeName=$(cut -d/ -f 2 <<< $sourcePath)
targetParent=${targetPath%/*}
targetFile=${targetPath##*/}
@ -300,18 +310,18 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
echo "A2SERVER: Preparing GS/OS installer scripts..."
# work through installer scripts
echo "Script: INSTALL.SYS.FILE"
processScript $netInstallDir/INSTALL/SCRIPTS/INSTAL.SYS.FILE
echo "Script: Install.Sys.File"
processScript $netInstallDir/Install/Scripts/Instal.Sys.File
echo "Script: HFS.FST"
processScript $netInstallDir/INSTALL/SCRIPTS/HFS.FST
processScript $netInstallDir/Install/Scripts/HFS.FST
echo "Script: DOS33.FST"
processScript $netInstallDir/INSTALL/SCRIPTS/DOS3.3.FST
echo "Script: TEACH"
processScript $netInstallDir/INSTALL/SCRIPTS/TEACH
echo "Script: APPLESHARE"
processScript $netInstallDir/INSTALL/SCRIPTS/APPLESHARE
echo "Script: SERVER.SYS.FILE"
processScript $netInstallDir/INSTALL/SCRIPTS/SERVER.SYS.FILE
echo "Script: Teach"
processScript $netInstallDir/Install/Scripts/Teach
echo "Script: AppleShare"
processScript $netInstallDir/Install/Scripts/Appleshare
echo "Script: Server.Sys.File"
processScript $netInstallDir/Install/Scripts/Server.Sys.File
# sync netatalk database
afpsync -v $gsosDir > /dev/null
@ -320,6 +330,15 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
fi
fi
if [[ ! $autoAnswerYes && gsosInstall -lt 2 ]]; then
echo
echo -n "Do you want to update the ProDOS 8 year tables? "
read
fi
if [[ $autoAnswerYes || ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
updateP8YearTables
fi
if [[ ! $autoAnswerYes ]]; then
echo
echo "Do you want to download and install utilities for working with"
@ -334,17 +353,17 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
# get Asimov2 (for GS/OS)
echo -n "Asimov 2.0"
if [[ -f $imageToolsDir/ASIMOV ]]; then
if [[ -f $imageToolsDir/Asimov ]]; then
echo " is already installed."
else
echo
cd /tmp/netboot
wget -q -nc http://www.ninjaforce.com/downloads/Asimov.shk
wget -qO Asimov.shk http://www.ninjaforce.com/downloads/Asimov.shk
nulib2 -x -s Asimov.shk > /dev/null
cp -p Asimov/Asimov $imageToolsDir/ASIMOV
cp -p Asimov/Asimov $imageToolsDir/Asimov
afpsync -v $gsosDir > /dev/null
cat Asimov/Asimov_rsrc_ >> $imageToolsDir/.AppleDouble/ASIMOV
afptype -p S16 -q $imageToolsDir/ASIMOV
cat Asimov/Asimov_rsrc_ >> $imageToolsDir/.AppleDouble/Asimov
afptype -p S16 -q $imageToolsDir/Asimov
fi
echo -n "GS-ShrinkIt 1.1"
@ -370,7 +389,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
else
echo
cd /tmp/netboot
wget -q -nc http://www.brutaldeluxe.fr/products/apple2gs/MOUNTIT.SHK
wget -q -O MOUNTIT.SHK http://www.brutaldeluxe.fr/products/apple2gs/MOUNTIT.SHK
cp -p MOUNTIT.SHK $imageToolsDir/MOUNTIT.SHK
afpsync -v $gsosDir > /dev/null
afptype -p SHK -q $imageToolsDir/MOUNTIT.SHK
@ -440,9 +459,10 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
fi
if [[ ! $autoAnswerYes ]]; then
[[ -f "$gsosDir/SYSTEM/START.GS.OS" ]] && gsosInstalled="GS/OS and " || gsosInstalled=
echo
echo "Do you want to download serial communications software for"
echo -n "GS/OS and ProDOS 8? "
echo "Do you want to download communications software for"
echo -n "$gsosInstalled""ProDOS 8? "
read
fi
if [[ $autoAnswerYes || ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
@ -453,7 +473,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
echo -n "Spectrum"
# get Spectrum
if [[ -f $spectrumDir/SPECTRUM.HDV || -d $spectrumDir/SPECTRUM.2.5.4 ]]; then
if [[ -f $spectrumDir/SPECTRUM.HDV || -f $spectrumDir/Spectrum ]]; then
echo " is already installed."
else
mkdir -p $spectrumDir
@ -477,33 +497,33 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
cppo -s -ad Spectrum.Gold.HDV .
userFolder=$(tr [:lower:] [:upper:] <<< $USER)
for thisFolder in \
INSTALLER/EXTRAS/CDEVS^SYSTEM/CDEVS \
INSTALLER/EXTRAS/TOOLS^SYSTEM/TOOLS \
INSTALLER/EXTRAS/FONTS^SYSTEM/FONTS \
INSTALLER/EXTRAS/SYSTEM.SETUP^SYSTEM/SYSTEM.SETUP \
INSTALLER/HELP^SYSTEM/DESK.ACCS \
INSTALLER/SPECTRUM.SOUNDS^SYSTEM/SOUNDS \
SPECTRUM.2.5.4/ADD.ONS^USERS/$userFolder/ADD.ONS \
SPECTRUM.2.5.4/SPECTRUM.SCRIPT^USERS/$userFolder/SPECTRUM.SCRIPT \
SPECTRUM.2.5.4/ADD.ONS^COMM/SPECTRUM/ADD.ONS \
SPECTRUM.2.5.4/SPECTRUM.SCRIPT^COMM/SPECTRUM/SPECTRUM.SCRIPT \
MANUALS^COMM/SPECTRUM/MANUALS
Installer/Extras/CDEvs^System/CDevs \
Installer/Extras/Tools^System/Tools \
Installer/Extras/Fonts^System/Fonts \
Installer/Extras/System.Setup^System/System.Setup \
Installer/Help^System/Desk.Accs \
Installer/Spectrum.Sounds^System/Sounds \
Spectrum.2.5.4/Add.Ons^USERS/$userFolder/Add.Ons \
Spectrum.2.5.4/Spectrum.Script^USERS/$userFolder/Spectrum.Script \
Spectrum.2.5.4/Add.Ons^Comm/Spectrum/Add.Ons \
Spectrum.2.5.4/Spectrum.Script^Comm/Spectrum/Spectrum.Script \
Manuals^Comm/Spectrum/Manuals
do
mkdir -p $gsosDir/"${thisFolder##*^}"
cp -R SPECTRUM.GOLD/${thisFolder%%^*}/* $gsosDir/"${thisFolder##*^}"
cp -R Spectrum.Gold/${thisFolder%%^*}/* $gsosDir/"${thisFolder##*^}"
mkdir -p $gsosDir/"${thisFolder##*^}"/.AppleDouble
cp -R SPECTRUM.GOLD/${thisFolder%%^*}/.AppleDouble/* $gsosDir/"${thisFolder##*^}"/.AppleDouble
cp -R Spectrum.Gold/${thisFolder%%^*}/.AppleDouble/* $gsosDir/"${thisFolder##*^}"/.AppleDouble
done
mv SPECTRUM.GOLD/INSTALLER/SOUNDPATCH SPECTRUM.GOLD/SPECTRUM.2.5.4/SPECTRUM $spectrumDir
mv Spectrum.Gold/Installer/SoundPatch Spectrum.Gold/Spectrum.2.5.4/Spectrum $spectrumDir
mkdir -p $spectrumDir/.AppleDouble
mv SPECTRUM.GOLD/INSTALLER/.AppleDouble/SOUNDPATCH SPECTRUM.GOLD/SPECTRUM.2.5.4/.AppleDouble/SPECTRUM $spectrumDir/.AppleDouble
mv Spectrum.Gold/Installer/.AppleDouble/SoundPatch Spectrum.Gold/Spectrum.2.5.4/.AppleDouble/Spectrum $spectrumDir/.AppleDouble
afpsync -v $gsosDir > /dev/null
fi
fi
echo -n "ProTERM and Z-Link"
# get A2CLOUD disk and copy from there
if [[ -f $commDir/PROTERM/PROTERM ]]; then
if [[ -f $protermDir/PROTERM ]]; then
echo " are already installed."
else
mkdir -p $protermDir
@ -524,7 +544,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
fi
echo -n "ADTPro and VSDRIVE"
if [[ -f $commDir/ADTPRO/ADTPRO ]]; then
if [[ -f $adtproDir/ADTPRO ]]; then
echo " are already installed."
else
mkdir -p $adtproDir
@ -563,6 +583,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
read
fi
if [[ $autoAnswerYes || ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
# Farallon bridge patch for GS/OS courtesy of Geoff Body
echo "A2SERVER: Downloading Farallon bridge patch..."
wget -O /tmp/FARALLON.PO "http://appleii.ivanx.com/a2server/files/FARALLON.B1.PO" &> /dev/null
if [[ -d $gsosDir/SYSTEM/SYSTEM.SETUP ]]; then