2 Commits

Author SHA1 Message Date
T. Joseph Carter
27d40503be *: Fixed trailing whitespace 2016-07-29 10:39:49 -07:00
Ivan X
1c8acba1ae Changed 1.5.1 in version history to 1.5.0r2 2016-07-04 15:49:08 -04:00
15 changed files with 213 additions and 318 deletions

View File

@@ -1,6 +1,5 @@
# A2SERVER
AppleTalk server for Apple // computers developed by Ivan Drucker, with
substantial rework and by T. Joseph Carter
AppleTalk server for Apple // computers developed by Ivan Drucker
Documentation here is sparse for the moment; see [Ivan's site]() for
information about A2SERVER and how it all works. There's a lot there and it's
@@ -14,14 +13,7 @@ relatively modern piece of it. As such they should be preserved as they are.
## Developer note
To use the scripts with a specific GitHub tag:
~~~ bash
export A2SERVER_SCRIPT_URL=https://raw.githubusercontent.com/RasppleII/a2server/TAG_GOES_HERE/
export A2SERVER_BINARY_URL=${A2SERVER_SCRIPT_URL}files
wget -O setup ${A2SERVER_SCRIPT_URL}setup/index.txt; source setup
~~~
Or, to use the scripts on your own server, including your local machine:
To use the scripts on your own server, including your local machine:
~~~ bash
export A2SERVER_SCRIPT_URL=http://yoururl.com/

View File

@@ -23,14 +23,15 @@ wget -O files/external/appleii/PPPX.1.3d4.SHK http://www.apple2.org/marinetti/PP
wget -O files/external/appleii/dsk2file.shk http://www.dwheeler.com/6502/oneelkruns/dsk2file.zip
wget -O files/external/appleii/gshk11.sea http://www.nulib.com/library/gshk11.sea
wget -O files/external/appleii/shrinkit.sdk http://www.nulib.com/library/shrinkit.sdk
wget -O files/external/appleii/spectrum_gold_2mg.zip http://speccie.uk/speccie/downloads/spectrum_gold_2mg.zip
wget -O files/external/appleii/uthernet2ll.bxy http://speccie.uk/speccie/downloads/uthernet2ll.bxy
wget -O files/external/appleii/uthernetll.bxy http://speccie.uk/speccie/downloads/uthernetll.bxy
wget -O files/external/appleii/spectrum_gold_2mg.zip http://www.speccie.co.uk/speccie/software/spectrum_gold_2mg.zip
wget -O files/external/appleii/uthernet2ll.bxy http://www.speccie.co.uk/speccie/software/uthernet2ll.bxy
wget -O files/external/appleii/uthernetll.bxy http://www.speccie.co.uk/speccie/software/uthernetll.bxy
unset safeUrl samUrl snapUrl
safeUrl=$(wget -qO- http://speccie.uk/software/safe2/ | grep -i 'safe2.*bxy' | tr '<>' '\n' | grep href | cut -d '=' -f 2 | tr -d '"')
samUrl=$(wget -qO- http://speccie.uk/software/sam2/ | grep -i 'sam2.*bxy' | tr '<>' '\n' | grep href | cut -d '=' -f 2 | tr -d '"')
snapUrl=$(wget -qO- http://speccie.uk/software/snap/ | grep -i 'snap.*bxy' | tr '<>' '\n' | grep href | cut -d '=' -f 2 | tr -d '"')
unset safeUrl samUrl snapUrl safeVer samVer snapVer
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 | tr -d '"')
samUrl=$(echo "$html" | grep -i 'sam2.*bxy' | tr '<>' '\n' | grep href | cut -d '=' -f 2 | tr -d '"')
snapUrl=$(echo "$html" | grep -i 'snap.*bxy' | tr '<>' '\n' | grep href | cut -d '=' -f 2 | tr -d '"')
wget -O files/external/appleii/safe2.bxy "$safeUrl"
wget -O files/external/appleii/sam2.bxy "$samUrl"
wget -O files/external/appleii/snap.bxy "$snapUrl"

View File

@@ -34,9 +34,7 @@ fi
debianName=
if [[ $debianVersion ]]; then
debianMajor=$(cut -d . -f 1 <<< $debianVersion)
if [[ $debianMajor == "9" ]]; then
debianName="stretch"
elif [[ $debianMajor == "8" ]]; then
if [[ $debianMajor == "8" ]]; then
debianName="jessie"
elif [[ $debianMajor == "7" ]]; then
debianName="wheezy"

View File

@@ -44,11 +44,7 @@ fi
debianName=
if [[ $debianVersion ]]; then
debianMajor=$(cut -d . -f 1 <<< $debianVersion)
if [[ $debianMajor == "10" ]]; then
debianName="buster"
elif [[ $debianMajor == "9" ]]; then
debianName="stretch"
elif [[ $debianMajor == "8" ]]; then
if [[ $debianMajor == "8" ]]; then
debianName="jessie"
elif [[ $debianMajor == "7" ]]; then
debianName="wheezy"
@@ -57,14 +53,6 @@ if [[ $debianVersion ]]; then
fi
fi
# enable SSH (disabled by default in Raspbian from late 2016 onward)
if [[ $isRpi && $debianMajor -ge 8 ]] && ! ps aux | grep -q '[s]shd'; then
echo "A2SERVER: Enabling ssh access..."
sudo systemctl enable ssh &> /dev/null && sudo systemctl start ssh &> /dev/null
else
echo "A2SERVER: ssh access is already enabled."
fi
# skip this if already done
if [[ -f /usr/local/etc/A2SERVER-version ]] && (( $(head -c 3 /usr/local/etc/A2SERVER-version) >= 101 )); then
@@ -112,25 +100,15 @@ else
if [[ $(apt-cache search '^libdb5.1$') ]]; then # Wheezy
# Dependencies: netatalk 2.2.4
sudo apt-get -y install libdb5.1
elif [[ $(apt-cache search '^libdb5.3$') ]]; then # Jessie or Stretch
elif [[ $(apt-cache search '^libdb5.3$') ]]; then # Jessie
# Dependencies: netatalk 2.2.4
sudo apt-get -y install libdb5.3
else
break
fi
if [[ $(apt-cache search '^libssl1.0.0$') ]]; then # Wheezy or Jessie
if [[ $(apt-cache search '^libssl1.0.0$') ]]; then
# Dependencies: netatalk 2.2.4
sudo apt-get -y install libssl1.0.0
elif [[ $(apt-cache search '^libssl1.0.2$') ]]; then # Stretch
# Dependencies: netatalk 2.2.4
sudo apt-get -y install libssl1.0.2
elif [[ $(apt-cache search '^libssl1.1$') ]]; then # Buster
# Dependencies: netatalk 2.2.4
echo "deb http://deb.debian.org/debian/ oldstable main" | sudo tee -a /etc/apt/sources.list > /dev/null
sudo apt-get -y update
sudo apt-get -y install libssl1.0.2
sudo sed -i '$d' /etc/apt/sources.list
sudo apt-get -y update
else
break
fi
@@ -138,7 +116,7 @@ else
if [[ $(apt-cache search '^libgcrypt11$') ]]; then # Wheezy
# Dependencies: netatalk 2.2.4
sudo apt-get -y install libgcrypt11
elif [[ $(apt-cache search '^libgcrypt20$') ]]; then # Jessie, Stretch, Buster
elif [[ $(apt-cache search '^libgcrypt20$') ]]; then # Jessie
# Dependencies: netatalk 2.2.4
sudo apt-get -y install libgcrypt20
else
@@ -147,7 +125,7 @@ else
# install Netatalk
if [[ $arch && ! -f /tmp/a2server-compileAlways ]]; then
{ wget -qO- "${binaryURL}precompiled/netatalk226-${arch}_${debianName}.tgz" | sudo tar Pzx; } &> /dev/null
{ wget -qO- "${binaryURL}precompiled/netatalk224-${arch}_${debianName}.tgz" | sudo tar Pzx; } &> /dev/null
fi
sudo mandb &> /dev/null
@@ -157,36 +135,12 @@ else
done
if [[ $compileFromSource ]]; then
# Dependencies: build-deps for netatalk 2.2.4
sudo apt-get -y install build-essential
if [[ $(dpkg -l | grep libssl-dev | tr -s ' ' | cut -d ' ' -f 3 | cut -c 1-3) == "1.1" ]]; then
echo "A2SERVER: WARNING: libssl-dev 1.1 is already installed; removing."
sudo apt-get -y purge libssl-dev
sudo apt -y autoremove
fi
if [[ $(apt-cache search '^libssl1.0-dev$') ]]; then # Stretch
# Dependencies: build-deps for netatalk 2.2.4
sudo apt-get -y install libssl1.0-dev
else # Jessie or Wheezy (libssl-dev 1.0.x) or Buster (absent)
if [[ $(apt-cache madison libssl-dev | grep '^libssl' | head -1 | cut -d '|' -f 2 | tr -d ' ' | cut -c 1-3) == "1.1" ]]; then # Buster, so pull from Stretch
echo "deb http://deb.debian.org/debian/ oldstable main" | sudo tee -a /etc/apt/sources.list > /dev/null
sudo apt-get -y update
sudo apt-get -y install libssl1.0.dev
sudo sed -i '$d' /etc/apt/sources.list
sudo apt-get -y update
else # Jessie or Wheezy
# Dependencies: build-deps for netatalk 2.2.4
sudo apt-get -y install libssl-dev
fi
fi
sudo apt-get -y install build-essential libssl-dev
if [[ $(apt-cache search '^libdb5.1-dev$') ]]; then # Wheezy
# Dependencies: build-deps for netatalk 2.2.4
sudo apt-get -y install libdb5.1-dev
elif [[ $(apt-cache search '^libdb5.3-dev$') ]]; then # Jessie, Stretch, Buster
elif [[ $(apt-cache search '^libdb5.3-dev$') ]]; then # Jessie
# Dependencies: build-deps for netatalk 2.2.4
sudo apt-get -y install libdb5.3-dev
else
@@ -194,23 +148,14 @@ else
# Dependencies: build-deps for netatalk 2.2.4
sudo apt-get -y install libdb-dev
fi
if [[ $(apt-cache search '^libgcrypt11-dev$') ]]; then # Stretch, Jessie or Wheezy
if [[ $(apt-cache search '^libgcrypt11-dev$') ]]; then # Jessie or Wheezy
# Dependencies: build-deps for netatalk 2.2.4
sudo apt-get -y install libgcrypt11-dev
elif [[ $(apt-cache search '^libgcrypt20-dev$') ]]; then # Buster
# Dependencies: build-deps for netatalk 2.2.4
echo "deb http://deb.debian.org/debian/ oldstable main" | sudo tee -a /etc/apt/sources.list > /dev/null
sudo apt-get -y update
sudo apt-get -y install libgcrypt11-dev
sudo sed -i '$d' /etc/apt/sources.list
sudo apt-get -y update
else
echo "A2SERVER: WARNING: unknown version of libgcrypt-dev is being installed."
# Dependencies: build-deps for netatalk 2.2.4
sudo apt-get -y install $(apt-cache search '^libgcrypt.*dev$' | sort -r | head -1 | cut -d ' ' -f 1)
fi
sudo apt-get clean
# get Netatalk
@@ -270,7 +215,7 @@ if ! hash macipgw &> /dev/null; then
unzip macipgw.zip 2> /dev/null
rm macipgw.zip &> /dev/null
fi
if [ ! -d macipgw* ]; then
if [[ ! -d macipgw-master ]]; then
wget -qO macipgw.zip "${binaryURL}external/source/macipgw.zip"
unzip macipgw.zip 2> /dev/null
rm macipgw.zip &> /dev/null
@@ -476,16 +421,11 @@ if ! hash ciopfs &> /dev/null; then
cd /tmp/ciopfs
if [[ $useExternalURL ]]; then
wget -q -O ciopfs-0.4.tar.gz http://www.brain-dump.org/projects/ciopfs/ciopfs-0.4.tar.gz
if (( $? != 0 )); then
wget -q -O ciopfs-0.4.tar.gz http://web.archive.org/web/20160911102924/http://www.brain-dump.org/projects/ciopfs/ciopfs-0.4.tar.gz
fi
tar zxf ciopfs-0.4.tar.gz &> /dev/null
rm ciopfs-0.4.tar.gz &> /dev/null
fi
if [ ! -f ciopfs*/ciopfs.c ]; then # single brackets required for glob
wget -q -O ciopfs-0.4.tar.gz ${binaryURL}external/source/ciopfs-0.4.tar.gz
tar zxf ciopfs-0.4.tar.gz &> /dev/null
rm ciopfs-0.4.tar.gz &> ?dev/null
fi
cd ciopfs*
make
@@ -589,7 +529,7 @@ if [[ -f "/lib/modules/$kernelRelease/kernel/drivers/net/appletalk/ipddp.ko" ]];
sudo mv /lib/modules/$kernelRelease/kernel/net/appletalk/appletalk.ko /tmp 2> /dev/null
if [[ ! $compileFromSource && ${arch%_*} == "debian" ]]; then
if [[ ${arch%_*} == "debian" ]]; then
echo "A2SERVER: Fetching AppleTalk kernel module for Debian..."
wget -qO /tmp/appletalk.tgz ${binaryURL}precompiled/appletalk-$kernelRelease-${arch}.tgz
if [[ $? -eq 0 ]]; then
@@ -602,12 +542,9 @@ if [[ -f "/lib/modules/$kernelRelease/kernel/drivers/net/appletalk/ipddp.ko" ]];
sudo sed -i "s/ATALKD_RUN=no/ATALKD_RUN=yes/" /etc/default/netatalk
sudo /etc/init.d/netatalk restart &> /dev/null
else
echo "A2SERVER: failed to load AppleTalk kernel module"
# if we didn't load it successfully, remove it
sudo rm /lib/modules/$kernelRelease/kernel/net/appletalk/appletalk.ko 2> /dev/null
fi
else # download failed, so premade kernel not found, remove empty file
rm /tmp/appletalk.tgz 2>/dev/null
fi
fi
@@ -625,7 +562,6 @@ if [[ -f "/lib/modules/$kernelRelease/kernel/drivers/net/appletalk/ipddp.ko" ]];
[[ -f /boot/config-$kernelRelease ]] || break
sudo apt-get -y install linux-headers-$kernelRelease linux-source-$kernelMajorMinor || break
sudo apt-get -y install build-essential
sudo apt-get -y install libelf-dev # required as of kernel 4.14.12, apparently
cd /usr/src
kernelSrc=$(find linux-source-${kernelMajorMinor}*)
if [[ ${kernelSrc##*.} == "xz" ]]; then
@@ -656,7 +592,6 @@ if [[ -f "/lib/modules/$kernelRelease/kernel/drivers/net/appletalk/ipddp.ko" ]];
sudo rm /usr/src/$kernelSrc
sudo rm -r /usr/src/linux-source-$kernelMajorMinor
sudo apt-get -y purge linux-source-$kernelMajorMinor
sudo apt -y autoremove
done
fi

View File

@@ -30,7 +30,6 @@ diskToolsP8Dir=$p8Dir/Disk.Tools.P8
commDir="/srv/A2SERVER/A2FILES/Comm"
gsosURL="http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Apple_II/Apple_IIGS_System_6.0.1/"
# alernate: http://web.archive.org/web/20080907081050/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
@@ -136,11 +135,11 @@ updateP8YearTables () {
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 | tr -d '\0') ]]; then
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 | tr -d '\0') ]]; then
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
@@ -571,9 +570,6 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
cd /tmp/netboot
if [[ $useExternalURL ]]; then
wget -qO Asimov.shk http://www.ninjaforce.com/downloads/Asimov.shk
if (( $? != 0 )); then
wget -qO Asimov.shk http://web.archive.org/web/20160330184627/http://www.ninjaforce.com/downloads/Asimov.shk
fi
nulib2 -x -s Asimov.shk &> /dev/null
fi
if [[ ! -d Asimov ]]; then
@@ -677,9 +673,6 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
cd /tmp/netboot
if [[ $useExternalURL ]]; then
wget -q -O dsk2file.shk http://www.dwheeler.com/6502/oneelkruns/dsk2file.zip
if (( $? != 0 )); then
wget -q -O dsk2file.shk http://web.archive.org/web/20120726132356/http://www.dwheeler.com/6502/oneelkruns/dsk2file.zip
fi
nulib2 -x -s dsk2file.shk &> /dev/null
fi
if [[ ! -f DSK2FILE58 ]]; then
@@ -751,15 +744,17 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
unset safeUrl samUrl snapUrl safeVer samVer snapVer
if [[ $useExternalURL ]]; then
safeUrl=$(wget -qO- http://speccie.uk/software/safe2/ | grep -i 'safe2.*bxy' | tr '<>' '\n' | grep href | cut -d '=' -f 2 | tr -d '"')
samUrl=$(wget -qO- http://speccie.uk/software/sam2/ | grep -i 'sam2.*bxy' | tr '<>' '\n' | grep href | cut -d '=' -f 2 | tr -d '"')
snapUrl=$(wget -qO- http://speccie.uk/software/snap/ | grep -i 'snap.*bxy' | tr '<>' '\n' | grep href | cut -d '=' -f 2 | tr -d '"')
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 | tr -d '"')
samUrl=$(echo "$html" | grep -i 'sam2.*bxy' | tr '<>' '\n' | grep href | cut -d '=' -f 2 | tr -d '"')
snapUrl=$(echo "$html" | grep -i 'snap.*bxy' | tr '<>' '\n' | grep href | cut -d '=' -f 2 | tr -d '"')
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"
echo -n "Spectrum $spectrumVer"
# get Spectrum
if [[ -f $commDir/Spectrum/Spectrum ]]; then
echo " is already installed."
@@ -773,7 +768,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
mkdir -p /tmp/netboot/spectrum
cd /tmp/netboot/spectrum
if [[ $useExternalURL ]]; then
wget -qO spectrum_gold_2mg.zip http://speccie.uk/speccie/downloads/spectrum_gold_2mg.zip
wget -qO spectrum_gold_2mg.zip http://www.speccie.co.uk/speccie/software/spectrum_gold_2mg.zip
unzip spectrum_gold_2mg.zip Spectrum.Gold.2mg &> /dev/null
fi
if [[ ! -f Spectrum.Gold.2mg || $(wc -c < Spectrum.Gold.2mg) -eq 0 ]]; then
@@ -821,9 +816,6 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
# TCP/IP update (3.0b8)
if [[ $useExternalURL ]]; then
wget -qO Marinetti3.0b8.po http://www.a2retrosystems.com/downloads/Marinetti3.0b8.po
if (( $? != 0 )); then
wget -qO Marinetti3.0b8.po http://web.archive.org/web/20171105043713/http://a2retrosystems.com/downloads/Marinetti3.0b8.po
fi
fi
if [[ $? != 0 || ! -f Marinetti3.0b8.po || $(wc -c < Marinetti3.0b8.po) != "819200" ]]; then
wget -qO Marinetti3.0b8.po ${binaryURL}external/appleii/Marinetti3.0b8.po
@@ -835,9 +827,6 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
if [[ $useExternalURL ]]; then
wget -qO PPPX.1.3d4.SHK http://www.apple2.org/marinetti/PPPX.1.3d4.SHK
fi
if (( $? != 0 )); then
wget -qO PPPX.1.3d4.SHK http://web.archive.org/web/20160331231844/http://www.apple2.org/marinetti/PPPX.1.3d4.SHK
fi
if [[ $? != 0 || ! -f PPPX.1.3d4.SHK || $(wc -c < PPPX.1.3d4.SHK) != "22068" ]]; then
wget -qO PPPX.1.3d4.SHK ${binaryURL}external/appleii/PPPX.1.3d4.SHK
fi
@@ -851,7 +840,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
# Uthernet Link Layer
if [[ $useExternalURL ]]; then
wget -qO uthernetll.bxy http://speccie.uk/speccie/downloads/uthernetll.bxy
wget -qO uthernetll.bxy http://www.speccie.co.uk/speccie/software/uthernetll.bxy
fi
if [[ $? != 0 || ! -f uthernetll.bxy || $(wc -c < uthernetll.bxy) -eq 0 ]]; then
wget -qO uthernetll.bxy ${binaryURL}external/appleii/uthernetll.bxy
@@ -860,7 +849,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
# Uthernet II Link Layer
if [[ $useExternalURL ]]; then
wget -qO uthernet2ll.bxy http://speccie.uk/speccie/downloads/uthernet2ll.bxy
wget -qO uthernet2ll.bxy http://www.speccie.co.uk/speccie/software/uthernet2ll.bxy
fi
if [[ $? != 0 || ! -f uthernet2ll.bxy || $(wc -c < uthernet2ll.bxy) -eq 0 ]]; then
wget -qO uthernet2ll.bxy ${binaryURL}external/appleii/uthernet2ll.bxy
@@ -882,7 +871,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
mkdir -p /tmp/netboot/safe2
cd /tmp/netboot/safe2
if [[ $useExternalURL ]]; then
[[ ! $safeUrl ]] && safeUrl="http://speccie.uk/speccie/downloads/safe230.bxy"
[[ ! $safeUrl ]] && safeUrl="http://www.speccie.co.uk/speccie/software/safe229.bxy"
wget -qO safe2.bxy "$safeUrl"
cppo -s -ad safe2.bxy . &> /dev/null
fi
@@ -916,7 +905,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
mkdir -p /tmp/netboot/sam2
cd /tmp/netboot/sam2
if [[ $useExternalURL ]]; then
[[ ! $samUrl ]] && samUrl="http://speccie.uk/speccie/downloads/sam206.bxy"
[[ ! $samUrl ]] && samUrl="http://www.speccie.co.uk/speccie/software/sam205.bxy"
wget -qO sam2.bxy "$samUrl"
cppo -s -ad sam2.bxy . &> /dev/null
fi
@@ -953,7 +942,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
mkdir -p /tmp/netboot/snap
cd /tmp/netboot/snap
if [[ $useExternalURL ]]; then
[[ ! $snapUrl ]] && snapUrl="http://speccie.uk/speccie/downloads/snap118.bxy"
[[ ! $snapUrl ]] && snapUrl="http://www.speccie.co.uk/speccie/software/snap118.bxy"
wget -qO snap.bxy "$snapUrl"
cppo -s -ad snap.bxy . &> /dev/null
fi

View File

@@ -158,7 +158,7 @@ readchars () {
&& ( $3 -ge 0 ) ]] || return 23; }
# args are valid
dd if="$1" bs=1 skip=$(($2)) $([[ $3 ]] && echo -n "count=$3") \
2> /dev/null | tr -d ' \0'
2> /dev/null
}
readcharDec () {
@@ -175,7 +175,7 @@ readcharDec () {
&& ( $2 -ge 0 ) ]] || return 22; }
# args are valid
charX="$(dd if="$1" bs=1 skip=$(($2)) \
count=1 2> /dev/null | tr -d '\0'; echo -n X)"
count=1 2> /dev/null; echo -n X)"
[[ ${#charX} -gt 1 ]] || { echo -n 0; return 0; }
echo -n "${charX:0:1}" | od -t u1 | \
head -1 | sed 's/[0\ ]*//' | tr -d ' \n'
@@ -195,7 +195,7 @@ readcharHex () {
&& ( $2 -ge 0 ) ]] || return 22; }
# args are valid
charX="$(dd if="$1" bs=1 skip=$(($2)) \
count=1 2> /dev/null | tr -d '\0'; echo -n X)"
count=1 2> /dev/null; echo -n X)"
[[ ${#charX} -gt 1 ]] || { echo -n "00"; return 0; }
printf %02X $(echo -n "${charX:0:1}" | od -t u1 | \
head -1 | sed 's/[0\ ]*//' | tr -d ' \n')

View File

@@ -1,7 +1,7 @@
#! /bin/bash
# vim: set tabstop=4 shiftwidth=4 expandtab filetype=sh:
# A2SERVER master setup script, last update 15-Jul-20
# A2SERVER master setup script, last update 17-Nov-15
# it downloads and executes several scripts related to the setup of
# netatalk configured for Apple II use on Debian or Raspbian.
# more info is at http://ivanx.com/a2server
@@ -9,7 +9,7 @@
# to download and execute, type:
# wget ivanx.com/a2server/setup; source setup
a2serverVersion="153"
a2serverVersion="150"
# Ensure URL we'll use ends in a /
case "$A2SERVER_SCRIPT_URL" in
@@ -29,7 +29,6 @@ isRpi=
isDebian=
lsb_release -a 2> /dev/null | grep -q 'Distributor ID:.Debian' && [[ ( -f /etc/debian_version ) && ( $(cut -d . -f 1 < /etc/debian_version) -ge "7" ) ]] && isDebian=1
installedVersion=
if [ -f /usr/local/etc/A2SERVER-version ]; then
installedVersion="$(cat /usr/local/etc/A2SERVER-version)"
fi
@@ -47,6 +46,7 @@ installAll=
setupNetBoot=
setupWindowsSharing=
compileAlways=
updateRasppleII=
rm /tmp/a2server-* 2> /dev/null
while [[ $1 ]]; do
if [[ $1 == "-r" ]]; then
@@ -72,6 +72,10 @@ while [[ $1 ]]; do
shift
compileAlways="-c"
touch /tmp/a2server-compileAlways
elif [[ $1 == "-os" || $1 == "os" ]]; then
# elif [[ ${1,,} == "rasppleii" || ${1,,} == "raspple" || ${1,,} == "rasappleii" || ${1,,} == "rasapple" || ${1,,} == "raspple2" || ${1,,} == "rasapple2" ]]; then
shift
updateRasppleII=1
elif [[ $1 == "-v" ]]; then
shift
# Version was already printed
@@ -85,10 +89,20 @@ while [[ $1 ]]; do
echo "-b: auto-setup network boot (use with -y)"
echo "-w: auto-setup Windows file sharing (use with -y)"
echo "-c: compile non-package items, rather than downloading binaries"
if [[ $isRpi ]]; then
echo "-os: update Raspbian OS, A2CLOUD, A2SERVER, and Apple II Pi"
fi
[[ $0 == "-bash" ]] && return 1 || exit 1
fi
done
if [[ $updateRasppleII ]]; then
echo "A2SERVER: Updating Raspple II (takes up to an hour)..."
wget -qO /tmp/raspbian-update "${A2SERVER_SCRIPT_URL}scripts/raspbian-update.txt"
source /tmp/raspbian-update a2cloud a2server $autoAnswerYes $skipRepoUpdate
[[ $0 == "-bash" ]] && return 0 || exit 0
fi
if { [[ -f /usr/local/etc/A2SERVER-version ]] && (( $(head -c 3 /usr/local/etc/A2SERVER-version) < 110 )); }; then
echo
echo "WARNING: The current A2SERVER installer scripts haven't been tested for"
@@ -100,7 +114,7 @@ fi
a2server_update=0
doSetup=1
if { [[ -f /usr/local/etc/A2SERVER-version ]] && (( $(head -c 3 /usr/local/etc/A2SERVER-version) < 152 )); }; then
if { [[ -f /usr/local/etc/A2SERVER-version ]] && (( $(head -c 3 /usr/local/etc/A2SERVER-version) < 150 )); }; then
a2server_update=1
fi
@@ -110,25 +124,23 @@ if [[ $isRpi ]]; then #supported Raspbian? (16-Feb-15, 20-Jun-14, 09-Jan-14, etc
fwsupported="-8aca5762- -462f3e3f476f7b6- -c32bc633039cd9- -9d34d0475f9-
-d4f5315cfac4e- -6f4a90c8cb8817f- -5dd9b4962e- -17c8799375-
-960832a6c2590635216c296b6ee0bebf67b21d50-
-2a329e0c7d8ea19c085bac5633aa4fccee0f21be-
-b2420fc150ae4616f5d9ec24bdaedc630586a529-"
-2a329e0c7d8ea19c085bac5633aa4fccee0f21be-"
[[ "$fwsupported" == *-$fwhash-* ]] && unsupportedOS=
# [[ ($fwhash == "8aca5762") || ($fwhash == "462f3e3f476f7b6") || ($fwhash == "c32bc633039cd9") || ($fwhash == "9d34d0475f9") || ($fwhash == "d4f5315cfac4e") || ($fwhash == "6f4a90c8cb8817f") || ($fwhash == "5dd9b4962e") || ($fwhash == "17c8799375") ]] && unsupportedOS=
elif [[ $isDebian ]]; then # supported Debian?
debianVersion=$(cat /etc/debian_version)
debianSupported="-10.4- -9.2- -8.2- -7.9- -7.8- -7.6- -7.3-"
debianSupported="-8.2- -7.9- -7.8- -7.6- -7.3-"
[[ $debianSupported == *-$debianVersion-* ]] && unsupportedOS=
fi
if [[ $unsupportedOS && $isRpi ]]; then
echo
echo "A2SERVER and its installer scripts have been tested on Raspbian Buster,"
echo "Stretch, Jessie, and Wheezy, though not this specific firmware version"
echo "(${fwhash:0:7}). Just FYI."
echo "A2SERVER and its installer scripts have been tested on Raspbian Wheezy and"
echo "Jessie, though not this specific firmware version ($fwhash). Just FYI."
unsupportedOS=
elif [[ $unsupportedOS && $isDebian ]]; then
echo
echo "A2SERVER and its installer scripts have been tested on Debian 7/8/9/10,"
echo "A2SERVER and its installer scripts have been tested on Debian 7 and 8,"
echo "though not this specific point release ($debianVersion). Just FYI."
unsupportedOS=
fi
@@ -168,16 +180,14 @@ if (( $doSetup )); then
if (( $doSetup )); then
checkPw=1
while [[ $checkPw ]] ; do
userPw=$(sudo grep "^$USER" /etc/shadow | cut -f 2 -d ':')
[[ $userPw == "$(echo 'apple2' | perl -e '$_ = <STDIN>; chomp; print crypt($_, $ARGV[0])' "${userPw%"${userPw#\$*\$*\$}"}")" ]] && isApple2Pw=1 || isApple2Pw=
[[ $userPw == "$(echo 'raspberry' | perl -e '$_ = <STDIN>; chomp; print crypt($_, $ARGV[0])' "${userPw%"${userPw#\$*\$*\$}"}")" ]] && isRaspberryPw=1 || isRaspberryPw=
password="your password"
[[ $isApple2Pw ]] && password="apple2"
[[ $isRaspberryPw ]] && password="raspberry"
checkPw=
[[ $isApple2Pw ]] && password="'apple2'"
[[ $isRaspberryPw ]] && password="'raspberry'"
[[ $isRpi ]] && a2server="your Raspberry Pi" || a2server="A2SERVER"
if [[ ! $isApple2Pw && ! -f /usr/local/etc/A2SERVER-version ]]; then
@@ -193,13 +203,11 @@ if (( $doSetup )); then
if [[ $autoAnswerYes || ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
echo "A2SERVER: changing password for user '$USER' to 'apple2'..."
echo "$USER:apple2" | sudo chpasswd
checkPw=1
fi
fi
done
echo
echo "During this installation, enter '${password}' if prompted for passwords."
echo "During this installation, enter ${password} if prompted for passwords."
echo
sudo true

View File

@@ -98,23 +98,4 @@
[unannounced]
1.5.1: May 2016: changed URLs from rawgit.com to raw.githubusercontent.com
to resolve https problems during install; OS X temp dir
path corrected; added getexternal.sh to repo;
cppo changes; minor text changes (JTC); better Debian
version checking (JTC)
[unannounced]
1.5.1r2: Oct 2017: set internal version to 1.5.1; expanded version history
[unannounced]
1.5.2: Nov 2017: support for Stretch; suppress null byte read warnings in
Bash 4.4; enable SSH server on Raspberry Pi if disabled;
use Internet Archive backup URL's for external downloads if
possible; compile AppleTalk kernel if -c flag is
specified (rather than downloading); better cleanup after
AppleTalk kernel compile; notification if AppleTalk kernel
module doesn't load; fixed download links for comm software;
bug fixes when compiling macipgw and ciopfs;
os option (Raspbian update) removed from a2server-setup
1.5.3a1: July 2020: initial support for Debian/Raspbian Buster
to resolve https problems during install

View File

@@ -67,17 +67,8 @@
for current date; install from any host URL for development;
source code at GitHub (thanks Joseph)
1.5.1: Jan 2016: fixed GitHub URLs to prevent https errors during installation
(thanks to http://blogs.yahoo.co.jp/ushi_cow/57459736.html);
bug fixes and minor text changes
1.5.1r2: Oct 2017: corrected version number
1.5.2: Nov 2017: support for Debian/Raspbian Stretch; fixes minor bugs during
install; enable SSH server if disabled on Raspberry Pi; fixes
changed download links for GS/OS communication software
1.5.3a2: July 2020: initial support for Debian/Raspbian Buster
1.5.0r2: Jan 16: fixed GitHub URLs to prevent https errors during installation
(thanks to http://blogs.yahoo.co.jp/ushi_cow/57459736.html)
Big thanks to: Anthony Martino, Henry Courbis, Joseph Carter, Jason King,
Andy McFadden, Steven Hirsch, Geoff Body, Peter Wong, Tony Diaz, David Schmidt,