mirror of
https://github.com/RasppleII/a2server.git
synced 2024-12-22 17:29:34 +00:00
Merge Ivan's 1.2.5, bump version to 1.3.0
This should give Ivan some breathing room while we work on trying to get things ready for Jessie.
This commit is contained in:
parent
1836b18c34
commit
f2244354c2
@ -27,6 +27,9 @@ protermDir=$commDir/PROTERM
|
|||||||
zlinkDir=$commDir/Z.LINK
|
zlinkDir=$commDir/Z.LINK
|
||||||
adtproDir=$commDir/ADTPRO
|
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"
|
||||||
|
|
||||||
# bail out on automated netboot setup unless -b is also specified
|
# bail out on automated netboot setup unless -b is also specified
|
||||||
[[ -f /tmp/a2server-autoAnswerYes ]] && autoAnswerYes=1 || autoAnswerYes=
|
[[ -f /tmp/a2server-autoAnswerYes ]] && autoAnswerYes=1 || autoAnswerYes=
|
||||||
if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
||||||
@ -123,39 +126,109 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
mkatinit -gs -d -f # GS/OS registered user and Guest starts up with SYSTEM/FINDER
|
mkatinit -gs -d -f # GS/OS registered user and Guest starts up with SYSTEM/FINDER
|
||||||
mkatinit -d -f guest # ProDOS 8 Guest starts up with BASIC.SYSTEM (no registered user)
|
mkatinit -d -f guest # ProDOS 8 Guest starts up with BASIC.SYSTEM (no registered user)
|
||||||
|
|
||||||
if [[ -f "/media/A2SHARED/A2FILES/SYSTEM/START.GS.OS" ]]; then
|
gsosInstall=
|
||||||
echo "A2SERVER: GS/OS has already been downloaded and installed."
|
gsosReinstall=1
|
||||||
gsosInstall=1
|
if [[ -f "$gsosDir/SYSTEM/START.GS.OS" ]]; then
|
||||||
else
|
while true; do
|
||||||
|
gsosInstall=
|
||||||
|
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
|
||||||
|
echo -n "What do you wanna do? "
|
||||||
|
read
|
||||||
|
if [[ $REPLY == "1" || $REPLY == "2" ]]; then
|
||||||
|
gsosReinstall=$REPLY
|
||||||
|
if (( $gsosReinstall == 1 )); then
|
||||||
|
echo
|
||||||
|
echo -n "Are you sure you want to delete your entire GS/OS System folder? "
|
||||||
|
read
|
||||||
|
if [[ ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
|
||||||
|
rm -r "$gsosDir/SYSTEM/* $gsosDir/System/.AppleDouble/*" 2> /dev/null
|
||||||
|
afpsync &> /dev/null
|
||||||
|
echo
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo -n "Are you sure you want to reinstall GS/OS over your existing system? "
|
||||||
|
read
|
||||||
|
if [[ ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
|
||||||
|
rm -r "$gsosDir/SYSTEM/START.GS.OS $gsosDir/System/.AppleDouble/START.GS.OS" 2> /dev/null
|
||||||
|
afpsync &> /dev/null
|
||||||
|
echo
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
gsosInstall=1
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ $gsosReinstall ]]; then
|
||||||
if [[ ! $autoAnswerYes ]]; then
|
if [[ ! $autoAnswerYes ]]; then
|
||||||
echo "You can set up GS/OS 6.0.1 on your network drive, for network boot."
|
echo "You can set up GS/OS for network boot. This may take a while."
|
||||||
echo -n "This may take a while. Download and install it now? "
|
echo "0: don't install GS/OS"
|
||||||
|
echo "1: GS/OS 6.0.1 (official Apple release, May 1993)"
|
||||||
|
echo "2: GS/OS 6.0.2 (community release by Antoine Vignau, July 2015)"
|
||||||
|
echo "3: GS/OS 6.0.3 (community release by Tony Diaz, August 2015)"
|
||||||
|
echo
|
||||||
|
echo -n "Which flavor would you like? "
|
||||||
read
|
read
|
||||||
fi
|
fi
|
||||||
if [[ $autoAnswerYes || ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
|
[[ $autoAnswerYes ]] && gsosVersion=1
|
||||||
gsosInstall=1
|
if [[ $REPLY == "1" || $REPLY == "2" || $REPLY == "3" ]]; then
|
||||||
|
gsosInstall=$REPLY
|
||||||
|
|
||||||
# get GS/OS disks from Internet Archive and put them in IMAGES
|
# get GS/OS disks from Internet Archive and put them in IMAGES
|
||||||
# also dump contents into NET.INSTALL and modify scripts to work from there
|
# also dump contents into NET.INSTALL and modify scripts to work from there
|
||||||
# echo
|
# echo
|
||||||
# echo "Come back in a while. This takes a long time."
|
# echo "Come back in a while."
|
||||||
echo
|
echo
|
||||||
echo "A2SERVER: Downloading GS/OS 6.0.1 installer disk images..."
|
echo "A2SERVER: Downloading GS/OS 6.0.${gsosInstall} installer disk images..."
|
||||||
cd /tmp/netboot
|
cd /tmp/netboot
|
||||||
mkdir -p $imagesDir
|
mkdir -p $imagesDir
|
||||||
mkdir -p $netInstallDir
|
mkdir -p $netInstallDir
|
||||||
activeDisk=0
|
activeDisk=0
|
||||||
for diskname in Install System.Disk SystemTools1 SystemTools2 Fonts synthLAB; do
|
|
||||||
outfile="$imagesDir/$(tr [:lower:] [:upper:] <<< $diskname)"
|
diskNames=( Install System.Disk SystemTools1 SystemTools2 Fonts synthLAB )
|
||||||
if [ ! -f $outfile ]; then
|
if (( $gsosInstall == 1 )); then
|
||||||
(( activeDisk++ ))
|
:
|
||||||
echo "A2SERVER: Disk ${activeDisk} of 6: $diskname"
|
elif (( $gsosInstall == 2 )); then
|
||||||
wget -qO "Disk_${activeDisk}_of_7-$diskname.sea.bin" "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%2FDisk_${activeDisk}_of_7-$diskname.sea.bin"
|
gsosURL="http://mirrors.apple2.org.za/Apple%20II%20Documentation%20Project/Software/Operating%20Systems/Apple%20IIGS%20System/Disk%20Images/"
|
||||||
|
diskNames=( Install System.Disk SystemTools1 SystemTools2 SystemTools3 Fonts1 Fonts2 synthLAB )
|
||||||
|
diskWebNames=( Install System%20disk System%20tools%201 System%20tools%202 System%20tools%203 Fonts%201 Fonts%202 Synthlab )
|
||||||
|
elif (( $gsosInstall == 3 )); then
|
||||||
|
gsosURL="ftp://ftp.apple.asimov.net/pub/apple_II/images/gs/os/gsos/Apple_IIGS_System_6.0.3/"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# delete previously downloaded installer
|
||||||
|
rm "$imagesDir/* $imagesDir/.AppleDouble/*" 2> /dev/null
|
||||||
|
rm "$netInstallDir/* $netInstallDir/.AppleDouble/*" 2> /dev/null
|
||||||
|
afpsync -v $gsosDir > /dev/null
|
||||||
|
|
||||||
|
for diskname in ${diskNames[@]}; do
|
||||||
|
outfile="$imagesDir/$(tr [:lower:] [:upper:] <<< $diskname)"
|
||||||
|
(( activeDisk++ ))
|
||||||
|
echo "A2SERVER: Disk ${activeDisk} of ${#diskNames[@]}: $diskname"
|
||||||
|
if (( $gsosInstall == 1 )); then
|
||||||
|
wget --max-redirect 0 -qO "Disk_${activeDisk}_of_7-$diskname.sea.bin" "${gsosURL}Disk_${activeDisk}_of_7-$diskname.sea.bin"
|
||||||
|
if (( $? != 0 )); then
|
||||||
|
wget -qO "Disk_${activeDisk}_of_7-$diskname.sea.bin" "${gsosBackupURL}Disk_${activeDisk}_of_7-$diskname.sea.bin"
|
||||||
|
fi
|
||||||
unar -k skip "Disk_${activeDisk}_of_7-$diskname.sea.bin" &> /dev/null
|
unar -k skip "Disk_${activeDisk}_of_7-$diskname.sea.bin" &> /dev/null
|
||||||
truncate -s 819284 "Disk ${activeDisk} of 7-${diskname}.sea"
|
truncate -s 819284 "Disk ${activeDisk} of 7-${diskname}.sea"
|
||||||
dd if="Disk ${activeDisk} of 7-${diskname}.sea" of=${outfile} bs=84 skip=1 &> /dev/null
|
dd if="Disk ${activeDisk} of 7-${diskname}.sea" of=${outfile} bs=84 skip=1 &> /dev/null
|
||||||
cppo -s -ad $outfile $netInstallDir 2> /dev/null
|
elif (( $gsosInstall == 2 )); then
|
||||||
fi
|
wget -qO $outfile "$gsosURL/IIGS%20System%206.0.2%20-%20Disk%20${activeDisk}%20${diskWebNames[$activeDisk-1]}.po"
|
||||||
|
elif (( $gsosInstall == 3 )); then
|
||||||
|
wget -qO $outfile "$gsosURL/$diskname.po"
|
||||||
|
fi
|
||||||
|
cppo -s -ad $outfile $netInstallDir 2> /dev/null
|
||||||
done
|
done
|
||||||
rm *.sea* &> /dev/null
|
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/*
|
||||||
@ -172,11 +245,12 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
pathPrefix="/A2FILES/GSOS.INSTALLER/NET.INSTALL"$(tr ':' '/' <<< ${scriptEntries[0]##S*\\\\#})
|
pathPrefix="/A2FILES/GSOS.INSTALLER/NET.INSTALL"$(tr ':' '/' <<< ${scriptEntries[0]##S*\\\\#})
|
||||||
entryCount=${#scriptEntries[@]}
|
entryCount=${#scriptEntries[@]}
|
||||||
(( entryCount -= 2 ))
|
(( entryCount -= 2 ))
|
||||||
entryIndex=3
|
# echo "entryCount: $entryCount"
|
||||||
while (( entryIndex < entryCount )); do
|
entryIndex=2
|
||||||
|
while (( entryIndex <= entryCount )); do
|
||||||
IFS='#'
|
IFS='#'
|
||||||
scriptEntry=(${scriptEntries[entryIndex]})
|
scriptEntry=(${scriptEntries[entryIndex]})
|
||||||
# echo $entryIndex $entryCount ${scriptEntry[1]}
|
# echo $entryIndex $entryCount ${scriptEntry[@]}
|
||||||
action=${scriptEntry[1]:0:1}
|
action=${scriptEntry[1]:0:1}
|
||||||
sourcePathMixed=$(tr ':' '/' <<< ${scriptEntry[5]})
|
sourcePathMixed=$(tr ':' '/' <<< ${scriptEntry[5]})
|
||||||
[[ ${sourcePathMixed:0:1} != '/' ]] && sourcePathMixed="${pathPrefix}/$sourcePathMixed"
|
[[ ${sourcePathMixed:0:1} != '/' ]] && sourcePathMixed="${pathPrefix}/$sourcePathMixed"
|
||||||
@ -214,13 +288,19 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
|
|
||||||
echo "A2SERVER: Preparing GS/OS installer scripts..."
|
echo "A2SERVER: Preparing GS/OS installer scripts..."
|
||||||
# work through installer scripts
|
# work through installer scripts
|
||||||
|
echo "Script: INSTALL.SYS.FILE"
|
||||||
processScript $netInstallDir/INSTALL/SCRIPTS/INSTAL.SYS.FILE
|
processScript $netInstallDir/INSTALL/SCRIPTS/INSTAL.SYS.FILE
|
||||||
|
echo "Script: HFS.FST"
|
||||||
|
processScript $netInstallDir/INSTALL/SCRIPTS/HFS.FST
|
||||||
|
echo "Script: APPLESHARE"
|
||||||
processScript $netInstallDir/INSTALL/SCRIPTS/APPLESHARE
|
processScript $netInstallDir/INSTALL/SCRIPTS/APPLESHARE
|
||||||
|
echo "Script: SERVER.SYS.FILE"
|
||||||
processScript $netInstallDir/INSTALL/SCRIPTS/SERVER.SYS.FILE
|
processScript $netInstallDir/INSTALL/SCRIPTS/SERVER.SYS.FILE
|
||||||
|
|
||||||
# sync netatalk database
|
# sync netatalk database
|
||||||
afpsync -v $gsosDir > /dev/null
|
afpsync -v $gsosDir > /dev/null
|
||||||
|
else
|
||||||
|
gsosInstall=
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -327,7 +407,10 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
else
|
else
|
||||||
echo
|
echo
|
||||||
cd /tmp/netboot
|
cd /tmp/netboot
|
||||||
wget -qO Apple_II_System_Disk_3.2.sea.bin 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_II_Supplemental%2FApple_II_System_Disk_3.2.sea.bin
|
wget --max-redirect 0 -qO Apple_II_System_Disk_3.2.sea.bin http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Apple_II/Apple_II_Supplemental/Apple_II_System_Disk_3.2.sea.bin
|
||||||
|
if (( $? != 0 )); then
|
||||||
|
wget -qO Apple_II_System_Disk_3.2.sea.bin 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_II_Supplemental%2FApple_II_System_Disk_3.2.sea.bin
|
||||||
|
fi
|
||||||
unar -k skip Apple_II_System_Disk_3.2.sea.bin &> /dev/null
|
unar -k skip Apple_II_System_Disk_3.2.sea.bin &> /dev/null
|
||||||
truncate -s 819284 'Apple II System Disk 3.2.sea'
|
truncate -s 819284 'Apple II System Disk 3.2.sea'
|
||||||
dd if='Apple II System Disk 3.2.sea' of=A2SYSDISK32.HDV bs=84 skip=1 2> /dev/null
|
dd if='Apple II System Disk 3.2.sea' of=A2SYSDISK32.HDV bs=84 skip=1 2> /dev/null
|
||||||
@ -414,7 +497,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
echo
|
echo
|
||||||
if (( $gsosInstall )); then
|
if [[ $gsosInstall ]]; then
|
||||||
echo "GS/OS network boot (for registered user and Guest) and"
|
echo "GS/OS network boot (for registered user and Guest) and"
|
||||||
fi
|
fi
|
||||||
echo "ProDOS 8 network boot (for Guest only) is now configured."
|
echo "ProDOS 8 network boot (for Guest only) is now configured."
|
||||||
|
@ -1,13 +1,11 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
# vim: set tabstop=4 shiftwidth=4 expandtab filetype=sh:
|
# vim: set tabstop=4 shiftwidth=4 expandtab filetype=sh:
|
||||||
|
|
||||||
# A2SERVER aliases:
|
|
||||||
|
|
||||||
alias a2server-help="more /usr/local/etc/a2server-help.txt"
|
alias a2server-help="more /usr/local/etc/a2server-help.txt"
|
||||||
alias a2server-setup="wget -q -O /tmp/a2server-setup ${A2SERVER_SCRIPT_URL:-http://appleii.ivanx.com/a2server}$([[ "$A2SERVER_SCRIPT_URL" == */ ]] || echo -n "/")setup/; source /tmp/a2server-setup"
|
alias a2server-setup="wget -q -O /tmp/a2server-setup ${A2SERVER_SCRIPT_URL:-http://appleii.ivanx.com/a2server}$([[ "$A2SERVER_SCRIPT_URL" == */ ]] || echo -n "/")setup/ || { echo \"Can't download A2SERVER setup scripts. Do you has internet?\"; false; } && source /tmp/a2server-setup"
|
||||||
|
|
||||||
alias a2server-version="cat /usr/local/etc/A2SERVER-version"
|
alias a2server-version="cat /usr/local/etc/A2SERVER-version"
|
||||||
alias a2server-update="wget -q -O /tmp/a2server-update ${A2SERVER_SCRIPT_URL:-http://appleii.ivanx.com/a2server}$([[ "$A2SERVER_SCRIPT_URL" == */ ]] || echo -n "/")update/; source /tmp/a2server-update"
|
alias a2server-update="wget -q -O /tmp/a2server-update ${A2SERVER_SCRIPT_URL:-http://appleii.ivanx.com/a2server}$([[ "$A2SERVER_SCRIPT_URL" == */ ]] || echo -n "/")update/ || { echo \"Can't download A2SERVER setup scripts. Do you has internet?\"; false; } && source /tmp/a2server-update"
|
||||||
|
|
||||||
alias system-shutdown='sudo shutdown -h now'
|
alias system-shutdown='sudo shutdown -h now'
|
||||||
alias system-restart='sudo shutdown -r now'
|
alias system-restart='sudo shutdown -r now'
|
||||||
@ -77,3 +75,12 @@ alias a2files-share="sudo sed -i 's/^\/media\/A2SHARED\/A2FILES\ A2FILES options
|
|||||||
alias a2files-unshare="sudo sed -i 's/^#share2/\/media\/A2SHARED\/A2FILES\ A2FILES options:prodos\ casefold:toupper/' /usr/local/etc/netatalk/AppleVolumes.default; [[ -d /media/A2SHARED/A2FILES ]] || mkdir /media/A2SHARED/A2FILES"
|
alias a2files-unshare="sudo sed -i 's/^#share2/\/media\/A2SHARED\/A2FILES\ A2FILES options:prodos\ casefold:toupper/' /usr/local/etc/netatalk/AppleVolumes.default; [[ -d /media/A2SHARED/A2FILES ]] || mkdir /media/A2SHARED/A2FILES"
|
||||||
|
|
||||||
alias showalias="alias | cut -d= -f 1 | cut -d' ' -f2 | more"
|
alias showalias="alias | cut -d= -f 1 | cut -d' ' -f2 | more"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# to download and execute, type:
|
# to download and execute, type:
|
||||||
# wget appleii.ivanx.com/a2server/setup; source setup
|
# wget appleii.ivanx.com/a2server/setup; source setup
|
||||||
|
|
||||||
a2serverVersion="125"
|
a2serverVersion="130"
|
||||||
|
|
||||||
# Ensure URL we'll use ends in a /
|
# Ensure URL we'll use ends in a /
|
||||||
case "$A2SERVER_SCRIPT_URL" in
|
case "$A2SERVER_SCRIPT_URL" in
|
||||||
@ -33,6 +33,7 @@ autoAnswerYes=
|
|||||||
setupNetBoot=
|
setupNetBoot=
|
||||||
setupWindowsSharing=
|
setupWindowsSharing=
|
||||||
updateRasppleII=
|
updateRasppleII=
|
||||||
|
rm /tmp/a2server-* 2> /dev/null
|
||||||
while [[ $1 ]]; do
|
while [[ $1 ]]; do
|
||||||
if [[ $1 == "-r" ]]; then
|
if [[ $1 == "-r" ]]; then
|
||||||
shift
|
shift
|
||||||
|
@ -50,5 +50,14 @@
|
|||||||
|
|
||||||
1.2.4: Jul 2015: offer to download A2CLOUD disk contents onto A2FILES volume
|
1.2.4: Jul 2015: offer to download A2CLOUD disk contents onto A2FILES volume
|
||||||
|
|
||||||
1.2.5: Oct 2015: support for using A2SERVER scripts from a location other than
|
1.2.5: Nov 2015: netboot install option for GS/OS 6.0.2/3
|
||||||
|
netboot always downloads GS/OS disk images even if present
|
||||||
|
provides error if a2setup doesn't have internet
|
||||||
|
remove persisting a2server-setup options after aborted install
|
||||||
|
fixed installer bug that omits first and last script elements
|
||||||
|
download images from Apple, with Internet Archive as a backup
|
||||||
|
install HFS.FST during netboot install
|
||||||
|
|
||||||
|
1.3.0: Oct 2015: support for using A2SERVER scripts from a location other than
|
||||||
appleii.ivanx.com/a2server for development purposes
|
appleii.ivanx.com/a2server for development purposes
|
||||||
|
Nov 2015: Merged Ivan's 1.2.5 release
|
||||||
|
Loading…
Reference in New Issue
Block a user