18 Commits
1.3.0 ... 1.3.2

Author SHA1 Message Date
Ivan X
95fb701098 get Spectrum/SAFE/SAM/SNAP URL's from dist page; display version numbers 2016-01-16 14:32:51 -05:00
Ivan X
3a0e123c0a clean up /tmp/cppo-* files on exit; centralized exit 2016-01-16 14:30:53 -05:00
Ivan X
5c47545772 provide -i option to reinstall core A2SERVER (not Apple II software)
bump version to 1.3.2
2016-01-15 14:08:45 -05:00
Ivan X
c5460eb292 reorganized and reduced number of netboot and software install prompts
better detection and less prompting for already installed software
preconfiguration of SAFE2 and SNAP
2016-01-15 14:06:22 -05:00
Ivan X
653218535f download and install nulib2-3.1.0a2 (rather than a1) 2016-01-15 13:40:13 -05:00
Ivan X
a0ded5a7cf fixed bug in 'appletalk-off' alias 2016-01-15 13:37:24 -05:00
Ivan X
3cc2beabcf support nulib2-3.1.0a2 (rather than working around bug in 3.1.0a1) 2016-01-15 13:34:52 -05:00
Ivan X
4ca810bd26 SNAP installed 2016-01-12 07:32:24 -05:00
Ivan X
f8d7a916e2 SAM2 (POP email) client installed; fix for extracting sdk with nulib2 2016-01-11 02:53:14 -05:00
Ivan X
80c4818d47 install SAFE2 (FTP client) 2016-01-11 01:46:39 -05:00
Ivan X
b846df61da extract .sdk containing one image into same folder 2016-01-11 01:45:48 -05:00
Ivan X
ec0bf3b9d5 cppo properly handles archived disk images (.sdk files) 2016-01-11 01:00:01 -05:00
Ivan X
631ad8a2e2 fixed bug preventing proper afpsync following mixed-case volume conversion 2016-01-10 18:42:09 -05:00
Ivan X
4ad9e10c77 full path display of filenames rather than quasi-hierarchy 2016-01-10 18:41:16 -05:00
Ivan X
9760380115 credit to Greg Branche for original Applesoft 2016-01-10 11:54:57 -05:00
Ivan X
5660347bc8 patches P8 Thunderclock driver year tables automatically based on current date 2016-01-10 11:32:22 -05:00
Ivan X
6f835905af only prompts for updating P8 year tables if 6.0.1 and not already patched 2016-01-10 07:50:28 -05:00
Ivan X
9bd8b0d3f0 python implementation of Apple's CLOCK.PATCH on GS/OS 6.0.1 System Tools 2 2016-01-09 16:53:57 -05:00
7 changed files with 744 additions and 232 deletions

View File

@@ -60,7 +60,7 @@ if ! hash nulib2 &> /dev/null; then
cd /tmp
if [[ $arch && ! -f /tmp/a2server-compileAlways ]]; then
{ wget -qO- "${binaryURL}precompiled/nulib2-3.1.0a1-${arch}.tgz" | sudo tar Pzx; } &> /dev/null
{ wget -qO- "${binaryURL}precompiled/nulib2-3.1.0a2-${arch}.tgz" | sudo tar Pzx; } &> /dev/null
fi
if ! hash nulib2 &> /dev/null; then
@@ -80,14 +80,14 @@ if ! hash nulib2 &> /dev/null; then
mkdir /tmp/nulib2
cd /tmp/nulib2
if [[ $useExternalURL ]]; then
wget -q -O nulib2-3.1.0a1.zip "https://github.com/fadden/nulib2/archive/51af83986cd5798daa7e0d82a161c9d3963c72bc.zip"
unzip nulib2-3.1.0a1.zip 2> /dev/null
rm nulib2-3.1.0a1.zip &> /dev/null
wget -q -O nulib2-3.1.0a2.zip "https://github.com/fadden/nulib2/archive/20fe7efb4d37fedf807416c16d74d51d893ea48a.zip"
unzip nulib2-3.1.0a2.zip 2> /dev/null
rm nulib2-3.1.0a2.zip &> /dev/null
fi
if [ ! -d nulib2* ]; then
wget -q -O nulib2-3.1.0a1.zip "${binaryURL}external/source/nulib2-3.1.0a1.zip"
unzip nulib2-3.1.0a1.zip 2> /dev/null
rm nulib2-3.1.0a1.zip &> /dev/null
wget -q -O nulib2-3.1.0a2.zip "${binaryURL}external/source/nulib2-3.1.0a2.zip"
unzip nulib2-3.1.0a2.zip 2> /dev/null
rm nulib2-3.1.0a2.zip &> /dev/null
fi
cd nulib2*
cd nufxlib

View File

@@ -358,6 +358,7 @@ if [[ -d /srv/A2SERVER/A2FILES && ! -d /srv/A2SERVER/.a2files ]]; then
mkdir /srv/A2SERVER/A2FILES
sudo sed -i 's/casefold:toupper //' /usr/local/etc/netatalk/AppleVolumes.default 2> /dev/null
sudo sed -i 's/^VOLCASEFOLD:.*/VOLCASEFOLD:/' /srv/A2SERVER/.a2files/.appledesktop/.volinfo 2> /dev/null
sudo sed -i 's|/media/A2SHARED/A2FILES|/srv/A2SERVER/A2FILES|' /srv/A2SERVER/.a2files/.appledesktop/.volinfo 2> /dev/null
fi
# 1.3.0: remove GSFILES if empty
@@ -380,7 +381,7 @@ fi
# set up A2FILES case-insensitive share (for ProDOS 8 files, and GS/OS system)
sudo sed -i \
's/^#share2/\/srv\/A2SERVER\/A2FILES\ A2FILES options:prodos\ ea:ad/' \
/usr/local/etc/netatalk/AppleVolumes.default
/usr/local/etc/netatalk/AppleVolumes.default
[[ -d /srv/A2SERVER/A2FILES ]] || mkdir -p /srv/A2SERVER/A2FILES
[[ -d /srv/A2SERVER/.a2files ]] || mkdir -p /srv/A2SERVER/.a2files
@@ -458,6 +459,8 @@ fi
# to make Netatalk start up when the server boots:
sudo update-rc.d netatalk defaults &> /dev/null
# prepare shared volumes for use
afpsync -v < /dev/null
# --- Setting up users

View File

@@ -9,12 +9,12 @@
# Ensure URL we'll use ends in a /
case "$A2SERVER_SCRIPT_URL" in
*/) scriptURL="$A2SERVER_SCRIPT_URL" ;;
*) scriptURL="${A2SERVER_SCRIPT_URL:-http://ivanx.com/a2server}/" ;;
*/) scriptURL="$A2SERVER_SCRIPT_URL" ;;
*) scriptURL="${A2SERVER_SCRIPT_URL:-http://ivanx.com/a2server}/" ;;
esac
case "$A2SERVER_BINARY_URL" in
*/) binaryURL="$A2SERVER_BINARY_URL" ;;
*) binaryURL="${A2SERVER_BINARY_URL:-http://ivanx.com/a2server/files}/" ;;
*/) binaryURL="$A2SERVER_BINARY_URL" ;;
*) binaryURL="${A2SERVER_BINARY_URL:-http://ivanx.com/a2server/files}/" ;;
esac
useExternalURL=1
[[ $A2SERVER_NO_EXTERNAL ]] && useExternalURL=
@@ -28,14 +28,45 @@ p8Dir="/srv/A2SERVER/A2FILES"
diskToolsP8Dir=$p8Dir/Disk.Tools.P8
commDir="/srv/A2SERVER/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"
# --- bashByter library routines
decToChar () {
# converts single-byte decimal value to equivalent character
# arg: decimal number from 0-255
# out: one character
#exit: 8=extraneous arg, 11=missing arg, 21=invalid arg
[[ $1 ]] || return 11
[[ $2 ]] && return 8
[[ ( $(printf %d "$1" 2> /dev/null ) == $1 ) \
&& ( $1 -ge 0 ) && ( $1 -le 255 ) ]] || return 21
# args are valid
echo -n -e "\x$(printf %02X "$1")"
}
charToDec () {
# converts single character to corresponding decimal value
# stdin OR arg: one character
# [arg overrides stdin; stdin is required for NUL (0) or LF (0x0A)]
# out: decimal value from 0-255
#exit: 8=extraneous arg, 9=invalid stdin,
# 11=missing stdin/arg, 21=invalid arg
[[ ( ! -t 0 ) && $1 ]] && { cat > /dev/null; return 8; }
[[ ( -t 0 ) ]] && { [[ $2 ]] && return 8; [[ $1 ]] || return 11; }
# arg/stdin is potentially valid (additional check below)
charX="$1X"; [[ $1 ]] || charX="$(cat; echo -n 'X';)"
[[ ${#charX} -le 2 ]] || return $(( $([[ $1 ]]; echo $?) ? 9 : 21 ))
# above line verifies that arg/stdin is valid
[[ ${#charX} -ne 2 ]] && { echo -n 0; return 0; }
echo -n "${charX:0:1}" | od -t u1 | \
head -1 | sed 's/[0\ ]*//' | tr -d ' \n'
}
# --- end bashByter
cpAD () {
# copy a file with its AppleDouble component in ./.AppleDouble
# arg1 = source path, # arg2 = destination directory (not filename)
@@ -52,32 +83,113 @@ cpAD () {
[[ $afpsync ]] && afpsync -v > /dev/null
}
checkP8YearTables () {
updateP8YearTables -c $1
return $?
}
updateP8YearTables () {
# Geoff Body and Andrew Roughan helped Joseph Carter with this one
# JC: 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.
# Effectively, we're turning p8 into the 6.0.2 or 6.0.3 version here.
#
# ID: updates the year tables for the Thunderclock driver in ProDOS 8;
# calculated from the day of week and date, as year is unavailable.
# accepts optional arguments for custom patches
# arg1 = year table, comma separated
# arg2 = date string for ProDOS splash screen in format "dd-Mmm-yy"
# OR for presets, arg1=602 or arg1=603, arg2 is empty
check=
if [[ $1 == "-c" ]]; then
check=1
shift
fi
patch1=""
patch2=""
if [[ $1 == "602" ]]; then
patch1=$(echo -n -e "\x12\x11\x0b\x10\x0f\x0e\x0d")
patch2=$(echo -n -e "\xb2\xb2\xad\xca\xf5\xee\xad\xb1\xb5")
elif [[ $1 == "603" ]]; then
patch1=$(echo -n -e "\x12\x11\x0b\x10\x0f\x0e\x0d")
patch2=$(echo -n -e "\xb0\xb2\xad\xc1\xf5\xe7\xad\xb1\xb5")
elif [[ $1 ]]; then # year table supplied as seven comma-separated values
for year in $(tr "," " " <<< $1); do
patch1=${patch1}$(echo -n -e "\x$(printf %02X $year)")
done
if [[ $2 ]]; then # splash screen date supplied, convert to high-ascii bytes
for c in $(sed "s/./& /g" <<< $2); do
patch2=${patch2}$(decToChar $(( $(charToDec $c) + 128 )))
done
fi
fi
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
files=("p8" "ProDOS16 Image" "Apple :2f:2fe Boot Blocks" "$gsosDir/System/P8")
offset1=(3958 7030 7071 3958) # splash screen date
offset2=(38 3110 79 38) # year table
i=0
if [[ $check ]]; then
# check if patched -- we're not actually doing this any more; we're always patching
patched=0 # 0 is true in this case since it's the return value
while (( $i < ${#files[@]} )); do
[[ ! -f "${files[$i]}" ]] && { (( i++ )); continue; }
if [[ ! $patch1 || $patch1 != $(sudo dd if="${files[$i]}" skip=${offset1[$i]} bs=1 count=7 2> /dev/null) ]]; then
patched=1 # 1 is false
break
fi
if [[ ! $patch2 || $patch2 != $(sudo dd if="${files[$i]}" skip=${offset2[$i]} bs=1 count=9 2> /dev/null) ]]; then
patched=1 # 1 is false
break
fi
(( i++ ))
done
else
# perform patch
while (( $i < ${#files[@]} )); do
[[ ! -f "${files[$i]}" ]] && { (( i++ )); continue; }
[[ $patch1 ]] && echo -n -e ${patch1} | sudo dd of="${files[$i]}" seek=${offset1[$i]} bs=1 conv=notrunc 2> /dev/null
[[ $patch2 ]] && echo -n -e ${patch2} | sudo dd of="${files[$i]}" seek=${offset2[$i]} bs=1 conv=notrunc 2> /dev/null
(( i++ ))
done
patched=0 # 0 is true
fi
return $patched
# 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=
netbootInstalled=
if [[ -f /usr/local/etc/netatalk/a2boot/ProDOS16\ Boot\ Blocks ]] && \
[[ -f /usr/local/etc/netatalk/a2boot/ProDOS16\ Image ]] && \
[[ -f /usr/local/etc/netatalk/a2boot/Apple\ :2f:2fe\ Boot\ Blocks ]] && \
[[ -f /usr/local/etc/netatalk/a2boot/p8 ]] && \
[[ -f /usr/local/etc/netatalk/a2boot/Basic.System ]]; then
netbootInstalled=1
fi
REPLY=
if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
if [[ ! $autoAnswerYes ]]; then
echo
echo "Do you want to set up A2SERVER to be able to boot Apple II"
echo -n "computers over the network? "
read
fi
if [[ ! $netbootInstalled ]]; then
echo
echo "Do you want to set up A2SERVER to be able to boot Apple II"
echo -n "computers over the network? "
read
else
echo "A2SERVER is already set up to boot Apple II computers over the network."
fi
fi
if [[ $autoAnswerYes || ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
nbmode=1
@@ -85,12 +197,15 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
sudo true
mkdir -p /tmp/netboot
rm -r /tmp/netboot/* 2> /dev/null
cd /tmp/netboot
# this will get "Disk 7" (Apple II Setup) as a raw (block dump) image
if [[ ! -f /usr/local/etc/netatalk/a2boot/ProDOS16\ Boot\ Blocks ]] \
|| [[ ! -f /usr/local/etc/netatalk/a2boot/ProDOS16\ Image ]] \
|| [[ ! -f /usr/local/etc/netatalk/a2boot/Apple\ :2f:2fe\ Boot\ Blocks ]]; then
|| [[ ! -f /usr/local/etc/netatalk/a2boot/Apple\ :2f:2fe\ Boot\ Blocks ]] \
|| [[ ! -f /usr/local/etc/netatalk/a2boot/p8 ]] \
|| [[ ! -f /usr/local/etc/netatalk/a2boot/Basic.System ]]; then
echo "A2SERVER: Downloading Apple II Boot Blocks..."
cd /tmp/netboot
@@ -109,10 +224,10 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
truncate -s 819284 'Disk 7 of 7-Apple II Setup.sea'
dd if='Disk 7 of 7-Apple II Setup.sea' of=APPLE2SETUP.HDV bs=84 skip=1 2> /dev/null
# copy the Boot Blocks into the right place
mkdir -p a2setup
sudo mount -t hfs -o ro,loop APPLE2SETUP.HDV a2setup
sudo mkdir -p /usr/local/etc/netatalk/a2boot
sudo rm -r /usr/local/etc/netatalk/a2boot/* 2> /dev/null
sudo cp -p a2setup/System\ Folder/* /usr/local/etc/netatalk/a2boot
sudo umount a2setup
sudo mv /usr/local/etc/netatalk/a2boot/Apple* /usr/local/etc/netatalk/a2boot/'Apple :2f:2fe Boot Blocks'
@@ -174,6 +289,10 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
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)
netbootInstalled=1
fi
if [[ $netbootInstalled ]]; then
gsosInstall=
gsosReinstall=1
if [[ -f "$gsosDir/SYSTEM/START.GS.OS" ]]; then
@@ -195,7 +314,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
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
rm -r "$gsosDir/System"/* "$gsosDir/System/.AppleDouble"/* 2> /dev/null
afpsync &> /dev/null
echo
break
@@ -204,7 +323,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
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
rm -r "$gsosDir/System/Start.GS.OS $gsosDir/System/.AppleDouble/Start.GS.OS" 2> /dev/null
afpsync &> /dev/null
echo
break
@@ -241,6 +360,8 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
# echo
echo
echo "A2SERVER: Downloading GS/OS 6.0.${gsosInstall} installer disk images..."
mkdir -p /tmp/netboot
rm -r /tmp/netboot/* 2> /dev/null
cd /tmp/netboot
mkdir -p $imagesDir
mkdir -p $netInstallDir
@@ -258,8 +379,8 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
fi
# delete previously downloaded installer
rm "$imagesDir/* $imagesDir/.AppleDouble/*" 2> /dev/null
rm "$netInstallDir/* $netInstallDir/.AppleDouble/*" 2> /dev/null
rm "$imagesDir/* $imagesDir/.AppleDouble"/* 2> /dev/null
rm "$netInstallDir/* $netInstallDir/.AppleDouble"/* 2> /dev/null
afpsync -v $gsosDir > /dev/null
for diskname in ${diskNames[@]}; do
@@ -352,6 +473,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
}
mkdir -p /tmp/netboot
rm -r /tmp/netboot/* 2> /dev/null
cd /tmp/netboot
echo "A2SERVER: Preparing GS/OS installer scripts..."
@@ -376,105 +498,128 @@ 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 && (! $gsosInstall || $gsosInstall -lt 2) ]] && ! checkP8YearTables 603; then
# echo
# echo -n "Do you want to update the ProDOS 8 Thunderclock year tables? "
# read
# fi
# if [[ $autoAnswerYes || ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
# updateP8YearTables 603
# elif [[ $gsosInstall -ge 2 ]]; then
# updateP8YearTables 60${gsosInstall}
# fi
if [[ ! $autoAnswerYes ]]; then
echo
echo "Do you want to download and install utilities for working with"
echo -n "disk images and archive files in GS/OS? "
read
# patch ProDOS 8 Thunderclock driver year table based on today's date
echo
echo "A2SERVER: Updating ProDOS 8 Thunderclock driver year tables..."
mkdir -p /tmp/netboot
rm -r /tmp/netboot/* 2> /dev/null
wget -qO /tmp/netboot/clock.patch.py "${scriptURL}scripts/clock.patch.py"
updateP8YearTables $(python /tmp/netboot/clock.patch.py $(LANG=C date +"%a %m/%d/%y"))
gsosInstalled=""
[[ -f "$gsosDir/System/Start.GS.OS" ]] && gsosInstalled="GS/OS and "
p8ToolsInstalled=
[[ -f $diskToolsP8Dir/SHRINKIT && -f $diskToolsP8Dir/DSK2FILE && -f $diskToolsP8Dir/SYSUTIL ]] && p8ToolsInstalled=1
gsosToolsInstalled=
[[ -f $imageToolsDir/Asimov && -f $gsosDir/System/System.Setup/MountIt && -f $imageToolsDir/GSHK ]] && gsosToolsInstalled=1
toolsInstalled=
if [[ $gsosInstalled ]]; then
[[ $gsosToolsInstalled && $p8ToolsInstalled ]] && toolsInstalled=1
else
toolsInstalled=$p8ToolsInstalled
fi
if [[ $autoAnswerYes || ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
# download image tools and put them in IMAGE.TOOLS
echo "A2SERVER: Downloading GS/OS disk image utilities..."
mkdir -p $imageToolsDir
# get Asimov2 (for GS/OS)
echo -n "Asimov 2.0"
if [[ -f $imageToolsDir/Asimov ]]; then
echo " is already installed."
REPLY=
if [[ ! $autoAnswerYes ]]; then
if [[ ! $toolsInstalled ]]; then
echo
echo "Do you want to download and install utilities for working with"
echo -n "disk images and archive files in ${gsosInstalled}ProDOS 8? "
read
else
echo
cd /tmp/netboot
if [[ $useExternalURL ]]; then
wget -qO Asimov.shk http://www.ninjaforce.com/downloads/Asimov.shk
nulib2 -x -s Asimov.shk &> /dev/null
fi
if [[ ! -d Asimov ]]; then
wget -qO Asimov.shk ${binaryURL}external/appleii/Asimov.shk
nulib2 -x -s Asimov.shk &> /dev/null
fi
cp -p Asimov/Asimov $imageToolsDir/Asimov
afpsync -v $gsosDir > /dev/null
cat Asimov/Asimov_rsrc_ >> $imageToolsDir/.AppleDouble/Asimov
afptype -p S16 -q $imageToolsDir/Asimov
echo "A2SERVER: Disk image and archive utilities are already installed."
fi
fi
if [[ $gsosInstalled ]]; then
if [[ $autoAnswerYes || ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
echo -n "GS-ShrinkIt 1.1"
# get GS-ShrinkIt
if [[ -f $imageToolsDir/GSHK ]]; then
echo " is already installed."
else
echo
mkdir -p /tmp/netboot/gshk
cd /tmp/netboot/gshk
if [[ $useExternalURL ]]; then
wget -qO gshk11.sea http://web.archive.org/web/20131031160750/http://nulib.com/library/gshk11.sea
#wget -qO gshk11.sea http://www.nulib.com/library/gshk11.sea
nulib2 -x -s gshk11.sea &> /dev/null
# download image tools and put them in IMAGE.TOOLS
echo "A2SERVER: Downloading GS/OS disk image utilities..."
mkdir -p $imageToolsDir
# get Asimov2 (for GS/OS)
echo -n "Asimov 2.0"
if [[ -f $imageToolsDir/Asimov ]]; then
echo " is already installed."
else
echo
cd /tmp/netboot
if [[ $useExternalURL ]]; then
wget -qO Asimov.shk http://www.ninjaforce.com/downloads/Asimov.shk
nulib2 -x -s Asimov.shk &> /dev/null
fi
if [[ ! -d Asimov ]]; then
wget -qO Asimov.shk ${binaryURL}external/appleii/Asimov.shk
nulib2 -x -s Asimov.shk &> /dev/null
fi
cp -p Asimov/Asimov $imageToolsDir/Asimov
afpsync -v $gsosDir > /dev/null
cat Asimov/Asimov_rsrc_ >> $imageToolsDir/.AppleDouble/Asimov
afptype -p S16 -q $imageToolsDir/Asimov
fi
if [[ ! -f GSHK ]]; then
wget -qO gshk11.sea ${binaryURL}external/appleii/gshk11.sea
nulib2 -x -s gshk11.sea &> /dev/null
echo -n "GS-ShrinkIt 1.1"
# get GS-ShrinkIt
if [[ -f $imageToolsDir/GSHK ]]; then
echo " is already installed."
else
echo
mkdir -p /tmp/netboot/gshk
cd /tmp/netboot/gshk
if [[ $useExternalURL ]]; then
wget -qO gshk11.sea http://web.archive.org/web/20131031160750/http://nulib.com/library/gshk11.sea
#wget -qO gshk11.sea http://www.nulib.com/library/gshk11.sea
nulib2 -x -s gshk11.sea &> /dev/null
fi
if [[ ! -f GSHK ]]; then
wget -qO gshk11.sea ${binaryURL}external/appleii/gshk11.sea
nulib2 -x -s gshk11.sea &> /dev/null
fi
cp -p GSHK $imageToolsDir/GSHK
afpsync -v $gsosDir > /dev/null
cat GSHK_rsrc_ >> $imageToolsDir/.AppleDouble/GSHK
afptype -p S16 -a DB07 -q $imageToolsDir/GSHK
cd /tmp/netboot
fi
cp -p GSHK $imageToolsDir/GSHK
afpsync -v $gsosDir > /dev/null
cat GSHK_rsrc_ >> $imageToolsDir/.AppleDouble/GSHK
afptype -p S16 -a DB07 -q $imageToolsDir/GSHK
cd /tmp/netboot
fi
echo -n "MountIt 1.4"
# get MountIt (for GS/OS)
if [[ -f $imageToolsDir/MOUNTIT.SHK ]]; then
echo " is already installed."
else
echo
mkdir -p /tmp/netboot/mountit
cd /tmp/netboot/mountit
if [[ $useExternalURL ]]; then
wget -q -O MOUNTIT.SHK http://www.brutaldeluxe.fr/products/apple2gs/MOUNTIT.SHK
cppo -s -ad MOUNTIT.SHK System:System.Setup:MountIt . &> /dev/null
cppo -s -ad MOUNTIT.SHK ReadMe . &> /dev/null
echo -n "MountIt 1.4"
# get MountIt (for GS/OS)
if [[ -f $gsosDir/System/System.Setup/MountIt ]]; then
echo " is already installed."
else
echo
mkdir -p /tmp/netboot/mountit
cd /tmp/netboot/mountit
if [[ $useExternalURL ]]; then
wget -q -O MOUNTIT.SHK http://www.brutaldeluxe.fr/products/apple2gs/MOUNTIT.SHK
cppo -s -ad MOUNTIT.SHK System:System.Setup:MountIt . &> /dev/null
cppo -s -ad MOUNTIT.SHK ReadMe . &> /dev/null
fi
if [[ ! -f ReadMe ]]; then
wget -qO MOUNTIT.SHK ${binaryURL}external/appleii/MOUNTIT.SHK
cppo -s -ad MOUNTIT.SHK System:System.Setup:MountIt . &> /dev/null
cppo -s -ad MOUNTIT.SHK ReadMe . &> /dev/null
fi
cpAD ./MountIt $gsosDir/System/System.Setup
mkdir -p $gsosDir/GSOS.Installer/Image.Tools/MountIt
cpAD ./ReadMe $gsosDir/GSOS.Installer/Image.Tools/MountIt
afpsync -v $gsosDir > /dev/null
fi
if [[ ! -f ReadMe ]]; then
wget -qO MOUNTIT.SHK ${binaryURL}external/appleii/MOUNTIT.SHK
cppo -s -ad MOUNTIT.SHK System:System.Setup:MountIt . &> /dev/null
cppo -s -ad MOUNTIT.SHK ReadMe . &> /dev/null
fi
cpAD ./MountIt $gsosDir/System/System.Setup
mkdir -p $gsosDir/GSOS.Installer/Image.Tools/MountIt
cpAD ./ReadMe $gsosDir/GSOS.Installer/Image.Tools/MountIt
afpsync -v $gsosDir > /dev/null
fi
fi
if [[ ! $autoAnswerYes ]]; then
echo
echo "Do you want to download and install utilities for working with"
echo -n "disk images and archive files in ProDOS 8? "
read
fi
if [[ $autoAnswerYes || ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
echo "A2SERVER: Downloading ProDOS 8 disk image utilities..."
mkdir -p $diskToolsP8Dir
@@ -488,13 +633,13 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
cd /tmp/netboot
if [[ $useExternalURL ]]; then
wget -qO shrinkit.sdk http://web.archive.org/web/20131031160750/http://www.nulib.com/library/shrinkit.sdk
nulib2 -x -s shrinkit.sdk &> /dev/null
nulib2 -x -s -e shrinkit.sdk &> /dev/null
fi
if [[ ! -f SHRINKIT ]]; then
if [[ ! -f "SHRINKIT#000118i" ]]; then
wget -qO shrinkit.sdk ${binaryURL}external/appleii/shrinkit.sdk
nulib2 -x -s shrinkit.sdk &> /dev/null
nulib2 -x -s -e shrinkit.sdk &> /dev/null
fi
cppo -s -ad SHRINKIT /SHRINKIT/SHRINKIT $diskToolsP8Dir &> /dev/null
cppo -s -ad "SHRINKIT#000118i" /SHRINKIT/SHRINKIT $diskToolsP8Dir &> /dev/null
afpsync -v $sharepath > /dev/null
fi
@@ -546,12 +691,27 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
fi
p8CommInstalled=
[[ -f $commDir/ProTERM/PROTERM && -f $commDir/Z.Link/Z.LINK && -f $commDir/ADTPro/ADTPRO && -f $commDir/ADTPro/VSDRIVE ]] && p8CommInstalled=1
gsosCommInstalled=
[[ -f $commDir/Spectrum/Spectrum && -f $commDir/SAM2/SAM2 && -f $commDir/SAFE2/SAFE2 && $commDir/SNAP/SNAP && $gsosDir/System/CDevs/TCPIP ]] && gsosCommInstalled=1
commInstalled=
if [[ $gsosInstalled ]]; then
[[ $gsosCommInstalled && $p8CommInstalled ]] && commInstalled=1
else
commInstalled=$p8CommInstalled
fi
REPLY=
if [[ ! $autoAnswerYes ]]; then
[[ -f "$gsosDir/System/Start.GS.OS" ]] && gsosInstalled="GS/OS and " || gsosInstalled=
echo
echo "Do you want to download communications software for"
echo -n "$gsosInstalled""ProDOS 8? "
read
if [[ ! $commInstalled ]]; then
echo
echo "Do you want to download communications software for"
echo -n "$gsosInstalled""ProDOS 8? "
read
else
echo
echo "A2SERVER: Communications software is already installed."
fi
fi
if [[ $autoAnswerYes || ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
@@ -560,29 +720,43 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
mkdir -p $commDir
if [[ $gsosInstalled ]]; then
echo -n "Spectrum"
unset safeUrl samUrl snapUrl safeVer samVer snapVer
if [[ $useExternalURL ]]; then
html=$(wget -qO- http://speccie.co.uk/speccie/Site/Download_Centre_files/widget1_markup.html)
safeUrl=$(echo "$html" | grep -i 'safe2.*bxy' | tr '<>' '\n' | grep href | cut -d '=' -f 2)
samUrl=$(echo "$html" | grep -i 'sam2.*bxy' | tr '<>' '\n' | grep href | cut -d '=' -f 2)
snapUrl=$(echo "$html" | grep -i 'snap.*bxy' | tr '<>' '\n' | grep href | cut -d '=' -f 2)
safeVer=$(echo $safeUrl | rev | cut -d '/' -f 1 | cut -d '.' -f 2 | rev | cut -c 5- | sed 's/./.&/g' | cut -c 2-)
samVer=$(echo $samUrl | rev | cut -d '/' -f 1 | cut -d '.' -f 2 | rev | cut -c 4- | sed 's/./.&/g' | cut -c 2-)
snapVer=$(echo $snapUrl | rev | cut -d '/' -f 1 | cut -d '.' -f 2 | rev | cut -c 5- | sed 's/./.&/g' | cut -c 2-)
spectrumVer=$(echo "$html" | grep 'Spectrum.*Gold.2mg' | tr '<>' '\n' | grep '^Spectrum.*2mg$' | cut -d ' ' -f 2)
fi
echo -n "Spectrum $spectrumVer"
# get Spectrum
if [[ -f $spectrumDir/Spectrum ]]; then
if [[ -f $commDir/Spectrum/Spectrum ]]; then
echo " is already installed."
else
echo
mkdir -p $spectrumDir
mkdir -p $commDir/Spectrum
# remove images that might have been installed by 1.2.5
cd $spectrumDir
cd $commDir/Spectrum
rm SPECTRUM.HDV MANUALS.HDV SOUNDS.HDV EXTRAS.HDV &> /dev/null
# install Spectrum into GS/OS
mkdir -p /tmp/netboot/spectrum
cd /tmp/netboot/spectrum
if [[ $useExternalURL ]]; then
wget -qO spectrum_gold_2mg.zip http://www.speccie.co.uk/speccie/software/spectrum_gold_2mg.zip
unzip -p spectrum_gold_2mg.zip 2> /dev/null | dd bs=64 skip=1 of=Spectrum.Gold.HDV 2> /dev/null
unzip spectrum_gold_2mg.zip Spectrum.Gold.2mg &> /dev/null
fi
if [[ ! -f Spectrum.Gold.HDV || $(wc -c < Spectrum.Gold.HDV) -eq 0 ]]; then
if [[ ! -f Spectrum.Gold.2mg || $(wc -c < Spectrum.Gold.2mg) -eq 0 ]]; then
wget -qO spectrum_gold_2mg.zip ${binaryURL}external/appleii/spectrum_gold_2mg.zip
unzip -p spectrum_gold_2mg.zip 2> /dev/null | dd bs=64 skip=1 of=Spectrum.Gold.HDV 2> /dev/null
unzip spectrum_gold_2mg.zip Spectrum.Gold.2mg &> /dev/null
fi
cppo -s -ad Spectrum.Gold.HDV . &> /dev/null
cppo -s -ad Spectrum.Gold.2mg . &> /dev/null
userFolder=$(tr [:lower:] [:upper:] <<< $USER)
for thisFolder in \
Installer/Extras/CDEvs^System/CDevs \
Installer/Extras/Tools^System/Tools \
@@ -590,10 +764,10 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
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 \
Spectrum.*/Add.Ons^USERS/$userFolder/Add.Ons \
Spectrum.*/Spectrum.Script^USERS/$userFolder/Spectrum.Script \
Spectrum.*/Add.Ons^Comm/Spectrum/Add.Ons \
Spectrum.*/Spectrum.Script^Comm/Spectrum/Spectrum.Script \
Manuals^Comm/Spectrum/Manuals
do
mkdir -p $gsosDir/"${thisFolder##*^}"
@@ -601,8 +775,8 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
mkdir -p $gsosDir/"${thisFolder##*^}"/.AppleDouble
cp -R Spectrum.Gold/${thisFolder%%^*}/.AppleDouble/* $gsosDir/"${thisFolder##*^}"/.AppleDouble
done
cpAD Spectrum.Gold/Installer/SoundPatch $spectrumDir
cpAD Spectrum.Gold/Spectrum.2.5.4/Spectrum $spectrumDir
cpAD Spectrum.Gold/Installer/SoundPatch $commDir/Spectrum
cpAD Spectrum.Gold/Spectrum.*/Spectrum $commDir/Spectrum
afpsync -v $gsosDir > /dev/null
fi
@@ -614,7 +788,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
mkdir -p /tmp/netboot/marinetti
cd /tmp/netboot/marinetti
# Marinetti 3.0b1
# Marinetti 3.0b1 -- had to repackage because installer is GS/OS self-contained app
wget -qO MarinettiB1.SHK ${binaryURL}appleii/MarinettiB1.SHK
cppo -ad -s -n MarinettiB1.SHK $gsosDir > /dev/null
@@ -666,41 +840,160 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
afpsync -v $gsosDir > /dev/null
fi
fi
echo -n "ProTERM and Z-Link"
echo -n "SAFE2 $safeVer"
if [[ -f $commDir/SAFE2/SAFE2 ]]; then
echo " is already installed."
else
echo
mkdir -p $commDir/SAFE2
mkdir -p /tmp/netboot/safe2
cd /tmp/netboot/safe2
if [[ $useExternalURL ]]; then
[[ ! $safeUrl ]] && safeUrl="http://www.speccie.co.uk/speccie/software/safe229.bxy"
wget -qO safe2.bxy "$safeUrl"
cppo -s -ad safe2.bxy . &> /dev/null
fi
if [[ ! -f SAFE2.Archive/Safe2 ]]; then
wget -qO safe2.bxy ${binaryURL}external/appleii/safe2.bxy
cppo -s -ad safe2.bxy . &> /dev/null
fi
cd SAFE2.Archive
cpAD Safe2 $commDir/SAFE2
cpAD The.Manual $commDir/SAFE2
cpAD Read.Me.First $commDir/SAFE2
cpAD Version.History $commDir/SAFE2
cpAD Fonts/SAFE.8 $gsosDir/System/Fonts
cpAD Fonts/Shaston.16 $gsosDir/System/Fonts
cpAD TimeZone/TimeZone $gsosDir/System/CDEvs
cpAD TimeZone/Tool056 $gsosDir/System/Tools
rm -r $gsosDir/System/Desk.Accs/Help.Files/SAFE2 2> /dev/null
mv Help/Help.Files/SAFE2 $gsosDir/System/Desk.Accs/Help.Files
wget -qO- ${scriptURL}files/safe2-setup.tgz | tar Pzx
afpsync -v $gsosDir > /dev/null
fi
echo -n "SAM2 $samVer"
if [[ -f $commDir/SAM2/SAM2 ]]; then
echo " is already installed."
else
echo
mkdir -p $commDir/SAM2
mkdir -p $commDir/SAM2/SAM2.Data
mkdir -p /tmp/netboot/sam2
cd /tmp/netboot/sam2
if [[ $useExternalURL ]]; then
[[ ! $samUrl ]] && samUrl="http://www.speccie.co.uk/speccie/software/sam205.bxy"
wget -qO sam2.bxy "$samUrl"
cppo -s -ad sam2.bxy . &> /dev/null
fi
if [[ ! -f SAM2.Archive/SAM2/SAM2 ]]; then
wget -qO sam2.bxy ${binaryURL}external/appleii/sam2.bxy
cppo -s -ad sam2.bxy . &> /dev/null
fi
cd SAM2.Archive
cpAD SAM2/SAM2 $commDir/SAM2
cpAD SAM2/SAM2.Data/Taglines $commDir/SAM2/SAM2.Data
cpAD Sounds/SP.Snds.Aux $gsosDir/System/Sounds
cpAD Fonts/SAM.8 $gsosDir/System/Fonts
cpAD Fonts/SAM.10 $gsosDir/System/Fonts
cpAD The.Manual $commDir/SAM2
cpAD Read.Me.First $commDir/SAM2
cpAD Version.History $commDir/SAM2
rm -r $gsosDir/System/Desk.Accs/Help.Files/SAM2 2> /dev/null
mv Help/Help.Files/SAM2 $gsosDir/System/Desk.Accs/Help.Files
# cpAD Fonts/SIS.3.10 $gsosDir/System/Fonts
# cpAD Fonts/SIS.4.10 $gsosDir/System/Fonts
# cpAD Tools/HTMLTool/TOOL130 $gsosDir/System/Tools
# cpAD Tools/Hierarchic/Hierarchic $gsosDir/System/CDEvs
# cpAD Fonts/Shaston.16 $gsosDir/System/Fonts
afpsync -v $gsosDir > /dev/null
fi
echo -n "SNAP $snapVer"
if [[ -f $commDir/SNAP/SNAP ]]; then
echo " is already installed."
else
echo
mkdir -p $commDir/SNAP
mkdir -p /tmp/netboot/snap
cd /tmp/netboot/snap
if [[ $useExternalURL ]]; then
[[ ! $snapUrl ]] && snapUrl="http://www.speccie.co.uk/speccie/software/snap118.bxy"
wget -qO snap.bxy "$snapUrl"
cppo -s -ad snap.bxy . &> /dev/null
fi
if [[ ! -f SNAP.Archive/SNAP ]]; then
wget -qO snap.bxy ${binaryURL}external/appleii/snap.bxy
cppo -s -ad snap.bxy . &> /dev/null
fi
cd SNAP.Archive
cpAD SNAP $commDir/SNAP
cpAD Fonts/SNAP.8 $gsosDir/System/Fonts
cpAD Fonts/SNAP.10 $gsosDir/System/Fonts
cpAD The.Manual $commDir/SNAP
cpAD Read.Me.First $commDir/SNAP
cpAD Change.List $commDir/SNAP
cpAD Quick.Start $commDir/SNAP
rm -r $gsosDir/System/Desk.Accs/Help.Files/SNAP 2> /dev/null
mv Help/Help.Files/SNAP $gsosDir/System/Desk.Accs/Help.Files
wget -qO- ${scriptURL}files/snap-setup.tgz | tar Pzx
# cpAD Fonts/SIS.3.10 $gsosDir/System/Fonts
# cpAD Fonts/SIS.4.10 $gsosDir/System/Fonts
# cpAD Tools/HTMLTool/TOOL130 $gsosDir/System/Tools
# cpAD Tools/Hierarchic/Hierarchic $gsosDir/System/CDEvs
# cpAD Fonts/Shaston.16 $gsosDir/System/Fonts
afpsync -v $gsosDir > /dev/null
fi
fi
echo -n "ProTERM 3.1"
# get A2CLOUD disk and copy from there
if [[ -f $protermDir/PROTERM ]]; then
echo " are already installed."
if [[ -f $commDir/ProTERM/PROTERM ]]; then
echo " is already installed."
else
echo
mkdir -p $protermDir
mkdir -p $protermDir/.AppleDouble
mkdir -p $zlinkDir
mkdir -p $zlinkDir/.AppleDouble
mkdir -p $commDir/ProTERM
mkdir -p $commDir/ProTERM/.AppleDouble
cd /tmp/netboot
wget -qO A2CLOUD.HDV "${binaryURL}appleii/A2CLOUD.HDV"
cppo -ad A2CLOUD.HDV . &> /dev/null
cppo -s -ad A2CLOUD.HDV . &> /dev/null
cd A2CLOUD
mv *PT3* *PROTERM* $protermDir
mv Z.LINK $zlinkDir
mv *PT3* *PROTERM* $commDir/ProTERM
cd .AppleDouble
mv *PT3* *PROTERM* $protermDir/.AppleDouble
mv Z.LINK $zlinkDir/.AppleDouble
mv *PT3* *PROTERM* $commDir/ProTERM/.AppleDouble
afpsync -v $gsosDir > /dev/null
fi
echo -n "ADTPro and VSDRIVE"
if [[ -f $adtproDir/ADTPRO ]]; then
echo " are already installed."
echo -n "Z-Link 12-15-91"
# get A2CLOUD disk and copy from there
if [[ -f $commDir/Z.Link/Z.LINK ]]; then
echo " is already installed."
else
mkdir -p $adtproDir
mkdir -p $adtproDir/.AppleDouble
echo
mkdir -p $commDir/Z.Link
mkdir -p $commDir/Z.Link/.AppleDouble
cd /tmp/netboot/A2CLOUD
mv Z.LINK $commDir/Z.Link
cd .AppleDouble
mv Z.LINK $commDir/Z.Link/.AppleDouble
afpsync -v $gsosDir > /dev/null
fi
echo -n "ADTPro 2.0.1"
if [[ -f $commDir/ADTPro/ADTPRO ]]; then
echo " is already installed."
else
mkdir -p $commDir/ADTPro
mkdir -p $commDir/ADTPro/.AppleDouble
echo
cd /tmp/netboot/A2CLOUD
mv *ADTPRO* *VEDRIVE* *VSDRIVE* $adtproDir
mv *ADTPRO* *VEDRIVE* *VSDRIVE* $commDir/ADTPro
cd .AppleDouble
mv *ADTPRO* *VEDRIVE* *VSDRIVE* $adtproDir/.AppleDouble
mv *ADTPRO* *VEDRIVE* *VSDRIVE* $commDir/ADTPro/.AppleDouble
afpsync -v $gsosDir > /dev/null
fi
@@ -721,31 +1014,30 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
fi
if [[ ! $autoAnswerYes ]]; then
echo
echo "Do you want to download the patch required for using"
echo -n "a Farallon LocalTalk-to-Ethernet bridge with GS/OS? "
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 -qO /tmp/FARALLON.PO "${binaryURL}appleii/FARALLON.B1.PO" &> /dev/null
if [[ -d $gsosDir/SYSTEM/SYSTEM.SETUP ]]; then
REPLY=
if [[ -d $gsosDir/SYSTEM/SYSTEM.SETUP ]]; then
if [[ ! $autoAnswerYes ]]; then
if [[ ! -f $gsosDir/SYSTEM/SYSTEM.SETUP/ATALKIRQ ]]; then
echo
echo "Do you want to download the patch required for using"
echo -n "a Farallon LocalTalk-to-Ethernet bridge with GS/OS? "
read
else
echo
echo "A2SERVER: The Farallon bridge patch has already been installed."
fi
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 -qO /tmp/FARALLON.PO "${binaryURL}appleii/FARALLON.B1.PO" &> /dev/null
cppo -s -ad /tmp/FARALLON.PO /ATALKPATCH/ATALKIRQ $gsosDir/SYSTEM/SYSTEM.SETUP &> /dev/null
echo
echo "A2SERVER: The Farallon bridge patch is installed."
else
cppo -s -ad /tmp/FARALLON.PO /ATALKPATCH/ATALKIRQ $gsosDir &> /dev/null
echo
echo "On your Apple IIgs, copy the file ATALKIRQ in /A2SHARED to the"
echo "SYSTEM.SETUP folder of the SYSTEM folder of your GSOS startup disk,"
echo "or, if you can't, download the patch from the A2SERVER web site."
echo "Note: Farallon bridges can only be used in GS/OS (with this patch)"
echo "and Apple IIe computers. Apple IIgs computers which network boot"
echo "directly into ProDOS 8 will freeze after a few minutes."
fi
echo
echo "Note: Farallon bridges can only be used in GS/OS (with this patch)"
echo "and Apple IIe computers. Apple IIgs computers which network boot"
echo "directly into ProDOS 8 will freeze after a few minutes."
fi
fi

180
scripts/clock.patch.py Executable file
View File

@@ -0,0 +1,180 @@
#!/usr/bin/env python
'''CLOCK.PATCH by Greg Branche implemented in Python 2/3 for A2SERVER
This is a line-for-line conversion of an edited version of CLOCK.PATCH
from the System Tools 2 disk in GS/OS 6.0.1. It's not good Python,
but I thought it would be an interesting exercise. In general
I have tried replicate each line as closely to BASIC as possible.
Because BASIC substrings are 1-based and python's are 0-based, various
indexes are minus one of their BASIC equivalents.
The one change is that you can optionally pass the day and date by
command line argument (e.g "Wed 3/13/15"). I also improved error
checking. These are in the BASIC lines that don't end in 0.
Rather than modifying PRODOS, this outputs a string of comma-separated
year values for a calling script (the a2server-setup installer),
followed by a space and a dd-Mmm-yy date string.
'''
# imports for python 3 code compatibility
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import absolute_import
from __future__ import division
# other imports
import sys
import datetime
# substitute raw_input for input in Python2
try: input = raw_input
except NameError: pass
dow_str = None
day = None
if len(sys.argv) > 2:
dow_str = sys.argv[1] # day of week passed on command line
day = sys.argv[2] # date passed on command line
# 60000 REM # of days in each month
data = [31,28,31,30,31,30,31,31,30,31,30] # 60010 DATA 31,28,31,30,31,30,31,31,30,31,30
# 60020 REM Names of days of week
data += [ # 60030 DATA SUN,MON,TUE,WED,THU,FRI,SAT
"SUN","MON","TUE","WED","THU","FRI","SAT"]
data = iter(data)
# 110 REM cu() = cumulative # of days in year
cu = [0] * 13 # 120 DIM CU(12)
# 130 REM fill array with # of days in year
cu[1] = 0 # 140 CU(1) = 0: REM January
for i in range(2,13): # 150 FOR I = 2 TO 12
x = next(data) # 160 READ X
cu[i] = cu[i-1] + x # 170 CU(I) = CU(I - 1) + X
# 180 NEXT I
# 200 REM DN$() = Names for days of week
dn = [""] * 8 # 210 DIM DN$(7)
# 220 REM fill array with names of days of week
for i in range(1,8): # 230 FOR I = 1 TO 7
dn[i] = next(data) # 240 READ DN$(I)
# 250 NEXT I
# 270 REM yt() is the year table values
yt = [0] * 8 # 280 DIM YT(7)
def mod7(x): # 340 DEF FN MOD7(X) = INT (((X / 7) - INT (X / 7)) * 7 + .5)
return int(((x / 7) - int(x / 7)) * 7 + .5)
def find_slash_pos(day): # 799 REM Finds position of / within date string
x = -1 # 800 X = 0: REM On exit, contains position of /, or 0 if none found
for i in range(0,3): # 810 FOR I = 1 TO 3
if day[i:i+1] == "/": x = i; break # 820 IF MID$ (DAY$,I,1) = "/" THEN X = I:I = 3
# 830 NEXT I
return x # 840 RETURN
while True: # 999 REM get the user's input and convert
if not day:
print( # 1010 PRINT "Please enter today's date (mm/dd/yy)"
"Please enter today's date (mm/dd/yy)")
day = input("-> ") # 1020 INPUT "-> ";DAY$
x = find_slash_pos(day) # 1030 GOSUB 800: REM find slash separator
input_ok = False
while not input_ok:
if not (x != -1): # 1040 IF X < > 0 THEN 1080
print( # 1050 PRINT "Invalid date entered. Please try again."; CHR$ (7)
"Invalid date entered. Please try again.\x07")
break # 1060 GOTO 1010
# 1070 REM Convert month value to numeric variable
mo = int(day[0:0+x]) # 1080 MO = VAL ( MID$ (DAY$,1,X - 1))
day = day[x+1:] # 1090 DAY$ = MID$ (DAY$,X + 1)
if mo < 1 or mo > 12: x = -1; continue # 1100 IF MO < 1 OR MO > 12 THEN 1050: REM Range check the month value
x = find_slash_pos(day) # 1110 GOSUB 800: REM Parse out the current day
if x == -1: continue # 1120 IF X = 0 THEN 1050
# 1130 REM Convert day string into numeric value
da = int(day[0:0+x]) # 1140 DA = VAL ( MID$ (DAY$,1,X - 1))
day = day[x+1:] # 1150 DAY$ = MID$ (DAY$,X + 1)
if da < 1 or da > 31: x = -1; continue # 1160 IF DA < 1 OR DA > 31 THEN 1050: REM Range check the day value
if mo == 2 and da > 29: # 1161 IF MO = 2 AND DA > 29 THEN 1050
x = -1; continue
if (mo == 4 or # 1162 IF (MO = 4 OR MO = 6 OR MO = 9 OR MO = 11) AND DA > 30 THEN 1050
mo == 6 or
mo == 9 or
mo == 11): x = -1; continue
# 1170 REM Convert year string into numeric value
yr = int(day) # 1180 YR = VAL (DAY$)
if yr < 0 or yr > 99: x = -1; continue # 1190 IF YR < 0 OR YR > 99 THEN 1050: REM Only allow 0-99
if yr > 39: yr = yr + 1900 # 1200 IF YR > 39 THEN YR = YR + 1900: REM 40-99 must be 1940-1999
if yr < 40: yr = yr + 2000 # 1210 IF YR < 40 THEN YR = YR + 2000: REM 0-39 must be 2000-2039
if ((yr / 4) != int(yr / 4) and # 1211 IF ((YR / 4) < > INT(YR / 4)) AND MO = 2 AND DA > 28 THEN 1050
mo == 2 and
da > 28): x = -1; continue
input_ok = True
if x != -1: break
else: dow_str = ""; day = ""
while True:
if not dow_str:
print(
"Please enter the day of the week") # 1230 PRINT "Please enter the day of the week"
dow_str = input("(e.g. Wed) -> ") # 1240 INPUT "(e.g. Wed) -> ";DOW$
input_ok = False
while not input_ok:
if not (len(dow_str) >= 3): # 1250 IF LEN (DOW$) > = 3 THEN 1270: REM Must be at least 3 characters
print( # 1260 PRINT "Invalid day of week. Please try again."; CHR$ (7): GOTO 1230
"Invalid day of week. Please try again.\x07")
break
if len(dow_str) > 3: # 1270 IF LEN (DOW$) > 3 THEN DOW$ = LEFT$ (DOW$,3)
dow_str = dow_str[0:0+3]
# 1280 REM Shift any lower case letters to upper case
b = "" # 1290 B$ = ""
for i in range(0,3): # 1300 FOR I = 1 TO 3
a = dow_str[i:i+1] # 1310 A$ = MID$ (DOW$,I,1)
if ( # 1320 IF ASC (A$) > = ASC ("a") AND ASC (A$) < = ASC ("z") THEN A$ = CHR$ ( ASC (A$) - ( ASC ("a") - ASC ("A")))
ord(a) >= ord("a") and ord(a) <= ord("z")): a = chr(ord(a) - (ord("a") - ord("A")))
b = b + a # 1330 B$ = B$ + A$
# 1340 NEXT I
dow_str = b # 1350 DOW$ = B$
# 1360 REM Now convert day-of-week string to numeric value
dow_num = 0 # 1370 DOW = 0
for i in range (1,8): # 1380 FOR I = 1 TO 7
if dow_str == dn[i]: # 1390 IF DOW$ = DN$(I) THEN DOW = I:I = 7
dow_num = i; i = 7
# 1400 NEXT I
if dow_num == 0: dow_str = ""; continue # 1410 IF DOW = 0 THEN 1260
input_ok = True
if len(dow_str) >= 3: break
else: dow_str = ""; day = ""
# 1430 REM Calculate the number of days so far this year
dys = da + cu[mo] # 1440 DYS = DA + CU(MO)
oyr = yr
# 1450 REM Must account for extra day in leap year
if ((yr / 4) == int(yr / 4)) and (mo > 2): # 1460 IF (YR / 4) = INT (YR / 4) AND MO > 2 THEN DYS = DYS + 1
dys = dys + 1
# 1480 REM Now calculate the index to use to fill in the table
idx = dow_num - mod7(dys) + 1 # 1490 IDX = DOW - FN MOD7(DYS) + 1
idx = abs(idx - 10) # 1500 IDX = ABS (IDX - 10)
if idx > 7: idx = idx - 7 # 1510 IF IDX > 7 THEN IDX = IDX - 7
# 1530 REM Now we can fill in the year table
for i in range(1,8): # 1540 FOR I = 1 TO 7
if '_i' in vars() and i < (_i + 1): continue # python: simulate change of i within loop
x = yr - 1900 # 1550 X = YR - 1900
if x >= 100: x = x - 100 # 1560 IF X > = 100 THEN X = X - 100
yt[idx] = x # 1570 YT(IDX) = X: REM store the year into table
idx = idx - 1 # 1580 IDX = IDX - 1
if idx < 1: idx = 7 # 1590 IF IDX < 1 THEN IDX = 7
if not ((yr / 4) != int(yr / 4)): # 1600 IF (YR / 4) < > INT (YR / 4) THEN 1660: REM not a leap year
i = i + 1; _i = i # 1610 I = I + 1: REM update index
if i > 7: continue # 1620 IF I > 7 THEN 1670: REM if entire array done, exit
yt[idx] = x # 1630 YT(IDX) = X: REM duplicate entry for leap year
idx = idx - 1 # 1640 IDX = IDX - 1
if idx < 1: idx = 7 # 1650 IF IDX < 1 THEN IDX = 7
yr = yr + 1 # 1660 YR = YR + 1
# 1670 NEXT I
print(",".join([str(x) for x in yt[1:]]) + " " +
str(da).encode("L1").decode("L1").zfill(2) + "-" +
datetime.date(1900, mo, 1).strftime('%b') + "-" +
str(oyr).encode("L1").decode("L1")[2:])

View File

@@ -42,7 +42,7 @@ alias netatalk-wifi='sudo sed -i 's/^eth0/wlan0/' /usr/local/etc/netatalk/atalkd
alias appletalk-off='sudo sed -i "s/ATALKD_RUN=yes/ATALKD_RUN=no/" /etc/default/netatalk; sudo killall macipgw > /dev/null; /etc/init.d/netatalk restart'
alias appletalk-off='sudo sed -i "s/ATALKD_RUN=yes/ATALKD_RUN=no/" /etc/default/netatalk; sudo /etc/init.d/netatalk restart'
alias appletalk-on='sudo sed -i "s/ATALKD_RUN=no/ATALKD_RUN=yes/" /etc/default/netatalk; sudo /etc/init.d/netatalk restart'

View File

@@ -59,8 +59,7 @@ g.activeFileName = None
g.activeFileSize = None
g.activeFileBytesCopied = 0
g.resourceFork = 0
g.shk_hasrf = ""
g.shk_rfork = 0
g.shk_hasrf = False
g.PDOSPATH = []
g.PDOSPATH_INDEX = 0
@@ -492,12 +491,13 @@ def processDir(arg1, arg2=None, arg3=None, arg4=None, arg5=None):
if (("/" + g.PDOSPATH_SEGMENT.lower()) !=
g.DIRPATH.lower()):
print("ProDOS volume name does not match disk image.")
sys.exit(2)
quitNow(2)
else:
g.PDOSPATH_INDEX += 1
g.PDOSPATH_SEGMENT = g.PDOSPATH[g.PDOSPATH_INDEX]
else:
print(g.DIRPATH)
pass
# print(g.DIRPATH)
while (pe < entryCount):
if (getStorageType(arg1, e) > 0):
#print(pe, e, entryCount)
@@ -540,7 +540,7 @@ def processEntry(arg1, arg2):
if (not g.PDOSPATH_INDEX or
g.activeFileName.upper() == g.PDOSPATH_SEGMENT.upper()):
# if ProDOS directory, not file
if (not g.SHK and getStorageType(arg1, arg2) == 13):
if not g.PDOSPATH_INDEX:
@@ -559,10 +559,18 @@ def processEntry(arg1, arg2):
g.targetDir = g.targetDir.rsplit("/", 1)[0]
g.ADdir = (g.targetDir + "/.AppleDouble")
else: # ProDOS or DOS 3.3 file either from image or ShrinkIt archive
dirPrint = ""
if g.DIRPATH:
dirPrint = g.DIRPATH + "/"
else:
if g.SHK:
if ("/".join(dirName.split('/')[3:])):
dirPrint = ("/".join(dirName.split('/')[3:]) + "/")
if (not g.extractFile or
(os.path.basename(g.extractFile.lower()) ==
origFileName.split('#')[0].lower())):
print(" " + g.activeFileName.split("#")[0] +
filePrint = g.activeFileName.split("#")[0]
print(dirPrint + filePrint +
("+" if (g.shk_hasrf or
(not g.SHK and getStorageType(arg1, arg2) == 5))
else "") +
@@ -622,7 +630,7 @@ def processEntry(arg1, arg2):
if (g.PDOSPATH_SEGMENT or
(g.extractFile and
(g.extractFile.lower() == origFileName.lower()))):
syncExit()
quitNow(0)
g.targetName = None
#else:
#print(g.activeFileName + " doesn't match " + g.PDOSPATH_SEGMENT)
@@ -734,17 +742,21 @@ def makeADfile():
writecharsHex(g.exFileData, hexToDec("7A"), "0000000F000002AD00000004")
# dbd (second time) will create DEV, INO, SYN, SV~
def syncExit():
if (not g.nomsg and g.AD and os.path.isdir("/usr/local/etc/netatalk")):
def quitNow(exitCode=0):
if (exitCode == 0 and not g.nomsg and
g.AD and os.path.isdir("/usr/local/etc/netatalk")):
print("File(s) have been copied to the target directory. " +
"If the directory")
print("is shared by Netatalk, please type 'afpsync' now.")
# saveFile(g.imageFile, g.imageData)
sys.exit(0)
if g.SHK: # clean up
for file in os.listdir("/tmp"):
if file.startswith("cppo-"):
shutil.rmtree(file)
sys.exit(exitCode)
def usage(exitcode=1):
print(sys.modules[__name__].__doc__)
sys.exit(exitcode)
quitNow(exitcode)
# --- ID bashbyter functions (adapted)
@@ -1141,7 +1153,7 @@ else:
g.imageFile = args[1]
if not os.path.isfile(g.imageFile):
print("Image/archive file \"" + g.imageFile + "\" was not found.")
sys.exit(2)
quitNow(2)
# automatically set ShrinkIt mode if extension suggests it
if (g.SHK or
@@ -1150,7 +1162,7 @@ if (g.SHK or
g.imageFile[-3:].lower() == "bxy"):
if (os.name == "nt"):
print("ShrinkIt archives cannot be extracted on Windows.")
sys.exit(2)
quitNow(2)
else:
try:
with open(os.devnull, "w") as fnull:
@@ -1158,7 +1170,7 @@ if (g.SHK or
g.SHK=1
except Exception:
print("Nulib2 is not available; not expanding ShrinkIt archive.")
sys.exit(2)
quitNow(2)
if (len(args) == 4):
g.extractFile = args[2]
@@ -1180,10 +1192,10 @@ if g.SHK:
print(
"File not found in ShrinkIt archive. Try cppo -cat to get the path,")
print(" and omit any leading slash or colon.")
sys.exit(1)
quitNow(1)
elif (result != 0):
print("ShrinkIt archive is invalid, or some other problem happened.")
sys.exit(1)
quitNow(1)
if g.extractFile:
g.extractFile = g.extractFile.replace(':', '/')
extractPath = (unshkdir + "/" + g.extractFile)
@@ -1196,27 +1208,32 @@ if g.SHK:
shutil.rmtree(unshkdir)
unshkdir = newunshkdir
fileNames = [name for name in os.listdir(unshkdir)
fileNames = [name for name in sorted(os.listdir(unshkdir))
if not name.startswith(".")]
if g.nodir:
oneDir = True # force extract in place
elif (len(fileNames) == 1 and os.path.isdir(unshkdir + "/" + fileNames[0])):
oneDir = True
if g.nodir: # extract in place from "-n"
curDir = True
elif (len(fileNames) == 1 and
os.path.isdir(unshkdir + "/" + fileNames[0])):
curDir = True # only one folder at top level, so extract in place
volumeName = toProdosName(fileNames[0])
else:
oneDir = False
elif (len(fileNames) == 1 and # disk image, so extract in place
fileNames[0][-1:] == "i"):
curDir = True
volumeName = toProdosName(fileNames[0].split("#")[0])
else: # extract in folder based on disk image name
curDir = False
volumeName = toProdosName(os.path.basename(g.imageFile))
if (volumeName[-4:].lower() == ".shk" or
volumeName[-4:].lower() == ".sdk" or
volumeName[-4:].lower() == ".bxy"):
volumeName = volumeName[0:-4]
if not g.CAT and not g.nodir and not g.extractFile:
if not g.CAT and not curDir and not g.extractFile:
print("Extracting into " + volumeName)
# recursively process unshrunk archive hierarchy
for dirName, subdirList, fileList in os.walk(unshkdir):
subdirList.sort()
if not g.CAT:
g.targetDir = (targetDir + ("" if oneDir else ("/" + volumeName)) +
g.targetDir = (targetDir + ("" if curDir else ("/" + volumeName)) +
("/" if (dirName.count('/') > 2) else "") +
("/".join(dirName.split('/')[3:]))) # chop tempdir
if g.extractFile: # solo item, so don't put it in the tree
@@ -1227,22 +1244,27 @@ if g.SHK:
makedirs(g.targetDir)
if g.AD:
makedirs(g.ADdir)
if not g.extractFile:
print("/".join(dirName.split('/')[3:])
if "/".join(dirName.split('/')[3:])
else "(top level)")
for fname in sorted(fileList):
g.shk_hasrf = ""
g.shk_rfork = False
if (fname[-1:] == "i"):
# disk image; rename to include suffix and correct type/auxtype
imagePath = os.path.join(dirName, fname).split("#")[0]
new_name = (imagePath +
("" if (imagePath.lower().endswith(".po") or
imagePath.lower().endswith(".hdv"))
else ".PO") + "#e00005")
os.rename(os.path.join(dirName, fname), new_name)
fname = os.path.basename(new_name)
g.shk_hasrf = False
rfork = False
if (fname[-1:] == "r" and
os.path.isfile(os.path.join(dirName, fname[:-1]))):
g.shk_rfork = True
rfork = True
elif (os.path.isfile(os.path.join(dirName, (fname + "r")))):
g.shk_hasrf = "+"
if not g.shk_rfork:
g.shk_hasrf = True
if not rfork:
processEntry(dirName, fname)
shutil.rmtree(unshkdir, True)
syncExit()
quitNow(0)
# end script if SHK
@@ -1327,12 +1349,12 @@ if g.extractFile:
g.targetName = targetPath.rsplit("/", 1)[1]
if not os.path.isdir(g.targetDir):
print("Target directory not found.")
sys.exit(2)
quitNow(2)
else:
if not g.CAT:
if not os.path.isdir(args[2]):
print("Target directory not found.")
sys.exit(2)
quitNow(2)
if g.D33:
diskName = os.path.basename(g.imageFile)
@@ -1355,7 +1377,7 @@ if g.D33:
readcharDec(g.imageData, ts(17,0)+2)])
if g.extractFile:
print("ProDOS file not found within image file.")
syncExit()
quitNow(0)
# below: ProDOS
@@ -1378,7 +1400,7 @@ if g.extractFile:
mkdir(g.ADdir)
processDir(2)
print("ProDOS file not found within image file.")
sys.exit(2)
quitNow(2)
else:
if not g.CAT:
# print(args[0], args[1], args[2])
@@ -1390,5 +1412,5 @@ else:
makedirs(g.ADdir)
processDir(2)
if not g.CAT:
syncExit()
quitNow(0)

View File

@@ -9,7 +9,7 @@
# to download and execute, type:
# wget ivanx.com/a2server/setup; source setup
a2serverVersion="130"
a2serverVersion="132"
# Ensure URL we'll use ends in a /
case "$A2SERVER_SCRIPT_URL" in
@@ -37,10 +37,11 @@ fi
echo
[[ $scriptURL != *"ivanx.com"* ]] && echo "Using script URL: $scriptURL"
[[ $binaryURL != *"ivanx.com"* ]] && echo "Using binary URL: $binaryURL"
[[ ! $useExternalURL ]] && echo -e "Not using external URLs. Payloads must be in:\n ${binaryURL}external\n (See A2SERVER developer page for more information.)"
[[ ! $useExternalURL ]] && echo -e "Not using external URLs. Downloads must be available from:\n ${binaryURL}external/appleii/\n ${binaryURL}external/source/\n (See the A2SERVER developer page for more information.)"
skipRepoUpdate=
autoAnswerYes=
installAll=
setupNetBoot=
setupWindowsSharing=
compileAlways=
@@ -51,6 +52,9 @@ while [[ $1 ]]; do
shift
skipRepoUpdate="-r"
touch /tmp/a2server-packageReposUpdated
elif [[ $1 == "-i" ]]; then
shift
installAll="-i"
elif [[ $1 == "-y" ]]; then
shift
autoAnswerYes="-y"
@@ -81,6 +85,7 @@ while [[ $1 ]]; do
elif [[ $1 ]]; then
echo "options:"
echo "-v: display installed and available versions, then exit"
echo "-i: reinstall A2SERVER software (but not Apple II software)"
echo "-y: auto-answer yes to all prompts"
echo "-r: don't update package repositories"
echo "-b: auto-setup network boot (use with -y)"
@@ -229,6 +234,16 @@ if (( $doSetup )); then
echo "A2SERVER: Scripts have been downloaded. Installing..."
if [[ $installAll ]]; then
sudo rm /usr/local/etc/A2SERVER-version 2> /dev/null
sudo rm /usr/local/bin/nulib2 2> /dev/null
sudo rm /usr/local/bin/unar 2> /dev/null
sudo rm /usr/local/sbin/macipgw 2> /dev/null
sudo rm /usr/local/bin/ciopfs 2> /dev/null
sudo rm /usr/local/etc/netatalk/afppasswd 2> /dev/null
sudo rm /usr/local/etc/netatalk/a2boot/p8 /usr/local/etc/netatalk/a2boot/ProDOS16\ Image 2> /dev/null
fi
/tmp/1.storage
rm /tmp/1.storage
/tmp/2.tools