mirror of
https://github.com/RasppleII/a2server.git
synced 2025-10-27 04:16:16 +00:00
Compare commits
13 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
27d40503be | ||
|
|
1c8acba1ae | ||
|
|
34836dcbb4 | ||
|
|
7b7917d417 | ||
|
|
938db3c46b | ||
|
|
4d1b5db5e3 | ||
|
|
7d1a06a916 | ||
|
|
f9b120002a | ||
|
|
49d50e49ac | ||
|
|
dfa1e26c80 | ||
|
|
d86e3bfa88 | ||
|
|
cd20570999 | ||
|
|
cd8271cd56 |
@@ -46,7 +46,7 @@ Once you have those:
|
|||||||
export A2SERVER_NO_EXTERNAL=1
|
export A2SERVER_NO_EXTERNAL=1
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
You may want to put the above exports into ~/.bashrc or ~/.bash_profile.
|
You may want to put the above exports into `~/.bashrc` or `~/.bash_profile`.
|
||||||
|
|
||||||
If you want to host scripts locally installed on your own machine or another
|
If you want to host scripts locally installed on your own machine or another
|
||||||
computer on your LAN, type the following, and export "http://localhost:8000/"
|
computer on your LAN, type the following, and export "http://localhost:8000/"
|
||||||
|
|||||||
1749
files/A2FILES-list.txt
Normal file
1749
files/A2FILES-list.txt
Normal file
File diff suppressed because it is too large
Load Diff
66
files/dist/getexternal.sh
vendored
Executable file
66
files/dist/getexternal.sh
vendored
Executable file
@@ -0,0 +1,66 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
# vim: set tabstop=4 shiftwidth=4 expandtab filetype=sh:
|
||||||
|
|
||||||
|
if ! hash wget; then
|
||||||
|
echo "wget is not installed. On a Mac, install it with MacPorts or Homebrew."
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Downloading items..."
|
||||||
|
|
||||||
|
mkdir -p files/external/source
|
||||||
|
wget -O files/external/source/ciopfs-0.4.tar.gz http://www.brain-dump.org/projects/ciopfs/ciopfs-0.4.tar.gz
|
||||||
|
wget -O files/external/source/macipgw.zip https://github.com/zero2sixd/macipgw/archive/2a5f6a7521a627e46b18468d44f4306fb0a7b7ab.zip
|
||||||
|
wget -O files/external/source/netatalk-2.2.4.tar.gz http://downloads.sourceforge.net/project/netatalk/netatalk/2.2.4/netatalk-2.2.4.tar.gz
|
||||||
|
wget -O files/external/source/nulib2-3.1.0a2.zip https://github.com/fadden/nulib2/archive/20fe7efb4d37fedf807416c16d74d51d893ea48a.zip
|
||||||
|
wget -O files/external/source/unar-1.8.1.zip https://github.com/incbee/Unarchiver/archive/unar-1.8.1.zip
|
||||||
|
|
||||||
|
mkdir -p files/external/appleii
|
||||||
|
wget --max-redirect 0 -O files/external/appleii/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
|
||||||
|
wget -O files/external/appleii/Asimov.shk http://www.ninjaforce.com/downloads/Asimov.shk
|
||||||
|
wget -O files/external/appleii/MOUNTIT.SHK http://www.brutaldeluxe.fr/products/apple2gs/MOUNTIT.SHK
|
||||||
|
wget -O files/external/appleii/Marinetti3.0b8.po http://www.a2retrosystems.com/downloads/Marinetti3.0b8.po
|
||||||
|
wget -O files/external/appleii/PPPX.1.3d4.SHK http://www.apple2.org/marinetti/PPPX.1.3d4.SHK
|
||||||
|
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://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 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"
|
||||||
|
|
||||||
|
for gsosInstall in {1..3}; do
|
||||||
|
activeDisk=0
|
||||||
|
mkdir -p files/external/appleii/gsos60${gsosInstall}
|
||||||
|
|
||||||
|
diskNames=( Install System.Disk SystemTools1 SystemTools2 Fonts synthLAB )
|
||||||
|
if (( $gsosInstall == 1 )); then
|
||||||
|
gsosURL="http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Apple_II/Apple_IIGS_System_6.0.1/"
|
||||||
|
wget --max-redirect 0 -O files/external/appleii/gsos601/Disk_7_of_7-Apple_II_Setup.sea.bin http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Apple_II/Apple_IIGS_System_6.0.1/Disk_7_of_7-Apple_II_Setup.sea.bin
|
||||||
|
elif (( $gsosInstall == 2 )); then
|
||||||
|
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
|
||||||
|
|
||||||
|
for diskname in ${diskNames[@]}; do
|
||||||
|
outfile="files/external/appleii/gsos60${gsosInstall}/$diskname.po"
|
||||||
|
(( activeDisk++ ))
|
||||||
|
if (( $gsosInstall == 1 )); then
|
||||||
|
wget --max-redirect 0 -O files/external/appleii/gsos601/"Disk_${activeDisk}_of_7-${diskname}.sea.bin" "${gsosURL}Disk_${activeDisk}_of_7-${diskname}.sea.bin"
|
||||||
|
elif (( $gsosInstall == 2 )); then
|
||||||
|
wget -O $outfile "$gsosURL/IIGS%20System%206.0.2%20-%20Disk%20${activeDisk}%20${diskWebNames[$activeDisk-1]}.po"
|
||||||
|
elif (( $gsosInstall == 3 )); then
|
||||||
|
wget -O $outfile "$gsosURL/$diskname.po"
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
done
|
||||||
152
files/netatalk-init.d-clean.txt
Executable file
152
files/netatalk-init.d-clean.txt
Executable file
@@ -0,0 +1,152 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
### BEGIN INIT INFO
|
||||||
|
# Provides: netatalk
|
||||||
|
# Required-Start: $remote_fs $syslog
|
||||||
|
# Should-Start: avahi-daemon
|
||||||
|
# Required-Stop: $remote_fs $syslog
|
||||||
|
# Default-Start: 2 3 4 5
|
||||||
|
# Default-Stop: 1
|
||||||
|
### END INIT INFO
|
||||||
|
#
|
||||||
|
# netatalk Netatalk 2.2.4 initscript
|
||||||
|
# Author: Thomas Kaiser <Thomas.Kaiser@phg-online.de>
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
|
PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
|
||||||
|
DESC="Netatalk"
|
||||||
|
NAME=netatalk
|
||||||
|
SCRIPTNAME=/etc/init.d/$NAME
|
||||||
|
|
||||||
|
# Guard to prevent execution if netatalk was removed.
|
||||||
|
test -x /usr/local/sbin/afpd || exit 0
|
||||||
|
|
||||||
|
# Set defaults. Please change these options in /etc/default/netatalk
|
||||||
|
ATALK_NAME=`/bin/hostname --short`
|
||||||
|
ATALK_UNIX_CHARSET='LOCALE'
|
||||||
|
ATALK_MAC_CHARSET='MAC_ROMAN'
|
||||||
|
|
||||||
|
CNID_METAD_RUN=yes
|
||||||
|
AFPD_RUN=yes
|
||||||
|
AFPD_MAX_CLIENTS=50
|
||||||
|
AFPD_UAMLIST="-U uams_dhx2.so"
|
||||||
|
AFPD_GUEST=nobody
|
||||||
|
CNID_CONFIG="-l log_note"
|
||||||
|
|
||||||
|
ATALKD_RUN=no
|
||||||
|
PAPD_RUN=no
|
||||||
|
TIMELORD_RUN=no
|
||||||
|
#A2BOOT_RUN=no
|
||||||
|
ATALK_ZONE=
|
||||||
|
ATALK_BGROUND=no
|
||||||
|
|
||||||
|
# old /etc/default/netatalk expected hostname in $HOSTNAME by default
|
||||||
|
HOSTNAME=`/bin/hostname`
|
||||||
|
|
||||||
|
# Read in netatalk configuration.
|
||||||
|
if [ -f /etc/default/netatalk ]; then
|
||||||
|
. /etc/default/netatalk
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Start Netatalk servers.
|
||||||
|
atalk_startup() {
|
||||||
|
if [ x"$ATALKD_RUN" = x"yes" ]; then
|
||||||
|
|
||||||
|
# Try to load the AppleTalk kernel module if it was intended.
|
||||||
|
if grep -q '^appletalk$' /etc/modules; then
|
||||||
|
/sbin/modprobe appletalk || echo "[could not load appletalk module]"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Start atalkd server.
|
||||||
|
/usr/local/sbin/atalkd
|
||||||
|
|
||||||
|
# register workstation
|
||||||
|
/usr/local/bin/nbprgstr -p 4 "$ATALK_NAME:Workstation$ATALK_ZONE"
|
||||||
|
/usr/local/bin/nbprgstr -p 4 "$ATALK_NAME:netatalk$ATALK_ZONE"
|
||||||
|
|
||||||
|
echo -n " atalkd"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# prepare startup of file services
|
||||||
|
if [ "x$CNID_METAD_RUN" = "xyes" -a -x /usr/local/sbin/cnid_metad ] ; then
|
||||||
|
echo -n " cnid_metad"
|
||||||
|
/usr/local/sbin/cnid_metad $CNID_CONFIG
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ x"$AFPD_RUN" = x"yes" ]; then
|
||||||
|
/usr/local/sbin/afpd $AFPD_UAMLIST -g $AFPD_GUEST -c $AFPD_MAX_CLIENTS \
|
||||||
|
-n "$ATALK_NAME$ATALK_ZONE"
|
||||||
|
echo -n " afpd"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "x$ATALKD_RUN" = "xyes" ]; then
|
||||||
|
if [ "x$PAPD_RUN" = "xyes" ]; then
|
||||||
|
/usr/local/sbin/papd
|
||||||
|
echo -n " papd"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ x"$TIMELORD_RUN" = x"yes" ]; then
|
||||||
|
/usr/local/sbin/timelord
|
||||||
|
echo -n " timelord"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
if [ "x$ATALK_BGROUND" = "xyes" -a "x$ATALKD_RUN" = "xyes" ]; then
|
||||||
|
echo "Starting Netatalk services in the background."
|
||||||
|
atalk_startup >/dev/null &
|
||||||
|
else
|
||||||
|
echo -n "Starting Netatalk services (this will take a while): "
|
||||||
|
atalk_startup
|
||||||
|
echo "."
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
stop)
|
||||||
|
echo -n "Stopping Netatalk Daemons:"
|
||||||
|
echo -n " afpd"
|
||||||
|
start-stop-daemon --stop --quiet --oknodo --exec /usr/local/sbin/afpd
|
||||||
|
|
||||||
|
echo -n " cnid_metad"
|
||||||
|
start-stop-daemon --stop --quiet --oknodo --exec /usr/local/sbin/cnid_metad
|
||||||
|
|
||||||
|
if test -x /usr/local/sbin/papd; then
|
||||||
|
echo -n " papd"
|
||||||
|
start-stop-daemon --stop --quiet --oknodo --exec /usr/local/sbin/papd
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -x /usr/local/sbin/timelord; then
|
||||||
|
echo -n " timelord"
|
||||||
|
start-stop-daemon --stop --quiet --oknodo --exec /usr/local/sbin/timelord
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -x /usr/local/sbin/atalkd; then
|
||||||
|
echo -n " atalkd"
|
||||||
|
start-stop-daemon --stop --quiet --oknodo --exec /usr/local/sbin/atalkd
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "."
|
||||||
|
;;
|
||||||
|
|
||||||
|
restart)
|
||||||
|
$0 force-reload
|
||||||
|
;;
|
||||||
|
|
||||||
|
force-reload)
|
||||||
|
echo -n "Restarting Netatalk Daemons (this will take a while)"
|
||||||
|
$0 stop
|
||||||
|
echo -n "."
|
||||||
|
sleep 2
|
||||||
|
echo -n "."
|
||||||
|
if $0 start; then
|
||||||
|
echo "done."
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop|restart|force-reload}" >&2
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
10
fix/fix.txt
10
fix/fix.txt
@@ -22,7 +22,7 @@ if [[ ${REPLY:0:1} == "y" || ${REPLY:0:1} == "Y" ]]; then
|
|||||||
echo -n "Press return to continue..."; read; echo
|
echo -n "Press return to continue..."; read; echo
|
||||||
|
|
||||||
ls -1 /dev/sd? > /tmp/sd2 2> /dev/null
|
ls -1 /dev/sd? > /tmp/sd2 2> /dev/null
|
||||||
|
|
||||||
# if exactly one drive has been inserted, exit loop
|
# if exactly one drive has been inserted, exit loop
|
||||||
if { ! diff /tmp/sd1 /tmp/sd2 &> /dev/null; }; then
|
if { ! diff /tmp/sd1 /tmp/sd2 &> /dev/null; }; then
|
||||||
# files are different, get dev name
|
# files are different, get dev name
|
||||||
@@ -47,9 +47,9 @@ if [[ ${REPLY:0:1} == "y" || ${REPLY:0:1} == "Y" ]]; then
|
|||||||
echo "No SD card found. Trying again..."
|
echo "No SD card found. Trying again..."
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
done
|
done
|
||||||
|
|
||||||
mkdir -p /tmp/sd
|
mkdir -p /tmp/sd
|
||||||
sudo mount ${devName}6 /tmp/sd
|
sudo mount ${devName}6 /tmp/sd
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ if [[ ${REPLY:0:1} == "y" || ${REPLY:0:1} == "Y" ]]; then
|
|||||||
fi
|
fi
|
||||||
done <<< "$(ls -1 /tmp/sd/lib/modules | sort -V)"
|
done <<< "$(ls -1 /tmp/sd/lib/modules | sort -V)"
|
||||||
sudo umount /tmp/sd
|
sudo umount /tmp/sd
|
||||||
|
|
||||||
echo kern:$kernelReplaced
|
echo kern:$kernelReplaced
|
||||||
if [[ $kernelReplaced ]]; then
|
if [[ $kernelReplaced ]]; then
|
||||||
echo
|
echo
|
||||||
@@ -104,7 +104,7 @@ if [[ ${REPLY:0:1} == "y" || ${REPLY:0:1} == "Y" ]]; then
|
|||||||
echo
|
echo
|
||||||
echo "Okey doke. Half done. Remove your SD card, and put it back in your Pi."
|
echo "Okey doke. Half done. Remove your SD card, and put it back in your Pi."
|
||||||
echo "After it boots, log in and type 'a2server-setup' to complete the fix."
|
echo "After it boots, log in and type 'a2server-setup' to complete the fix."
|
||||||
fi
|
fi
|
||||||
echo "See the A2SERVER web site at http://ivanx.com/a2server for more help."
|
echo "See the A2SERVER web site at http://ivanx.com/a2server for more help."
|
||||||
echo "(You can type 'sudo shutdown -h now' if you're done on this machine.)"
|
echo "(You can type 'sudo shutdown -h now' if you're done on this machine.)"
|
||||||
echo
|
echo
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ if [[ -d /media/A2SHARED ]]; then
|
|||||||
sudo mv /media/A2SHARED /srv/A2SERVER
|
sudo mv /media/A2SHARED /srv/A2SERVER
|
||||||
sudo sed -i 's|/media/A2SHARED|/srv/A2SERVER|g' /usr/local/etc/netatalk/AppleVolumes.default
|
sudo sed -i 's|/media/A2SHARED|/srv/A2SERVER|g' /usr/local/etc/netatalk/AppleVolumes.default
|
||||||
[[ -f /etc/samba/smbd.conf ]] && sudo sed -i 's|/media/A2SHARED|/srv/A2SERVER|g' /etc/samba/smbd.conf
|
[[ -f /etc/samba/smbd.conf ]] && sudo sed -i 's|/media/A2SHARED|/srv/A2SERVER|g' /etc/samba/smbd.conf
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# skip if we're already set up
|
# skip if we're already set up
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
# 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
|
||||||
*/) scriptURL="$A2SERVER_SCRIPT_URL" ;;
|
*/) scriptURL="$A2SERVER_SCRIPT_URL" ;;
|
||||||
*) scriptURL="${A2SERVER_SCRIPT_URL:-https://rawgit.com/RasppleII/a2server/current}/" ;;
|
*) scriptURL="${A2SERVER_SCRIPT_URL:-https://raw.githubusercontent.com/RasppleII/a2server/current}/" ;;
|
||||||
esac
|
esac
|
||||||
case "$A2SERVER_BINARY_URL" in
|
case "$A2SERVER_BINARY_URL" in
|
||||||
*/) binaryURL="$A2SERVER_BINARY_URL" ;;
|
*/) binaryURL="$A2SERVER_BINARY_URL" ;;
|
||||||
@@ -22,7 +22,7 @@ arch=
|
|||||||
if [[ -f /usr/bin/raspi-config ]]; then
|
if [[ -f /usr/bin/raspi-config ]]; then
|
||||||
isRpi=1
|
isRpi=1
|
||||||
arch='rpi'
|
arch='rpi'
|
||||||
elif lsb_release -a 2> /dev/null | grep -q 'Distributor ID:.Debian' && [[ $(cut -c 1 <<< $debianVersion) -ge "7" ]]; then
|
elif lsb_release -a 2> /dev/null | grep -q 'Distributor ID:.Debian' && [[ $(cut -d . -f 1 <<< $debianVersion) -ge "7" ]]; then
|
||||||
uname_m="$(uname -m)"
|
uname_m="$(uname -m)"
|
||||||
if [[ $uname_m == "i686" ]]; then
|
if [[ $uname_m == "i686" ]]; then
|
||||||
arch='debian_x86'
|
arch='debian_x86'
|
||||||
@@ -33,10 +33,10 @@ fi
|
|||||||
|
|
||||||
debianName=
|
debianName=
|
||||||
if [[ $debianVersion ]]; then
|
if [[ $debianVersion ]]; then
|
||||||
debianMajor=$(cut -c 1-2 <<< $debianVersion)
|
debianMajor=$(cut -d . -f 1 <<< $debianVersion)
|
||||||
if [[ $debianMajor == "8." ]]; then
|
if [[ $debianMajor == "8" ]]; then
|
||||||
debianName="jessie"
|
debianName="jessie"
|
||||||
elif [[ $debianMajor == "7." ]]; then
|
elif [[ $debianMajor == "7" ]]; then
|
||||||
debianName="wheezy"
|
debianName="wheezy"
|
||||||
else
|
else
|
||||||
debianName="unknown"
|
debianName="unknown"
|
||||||
@@ -62,7 +62,7 @@ if ! hash nulib2 &> /dev/null; then
|
|||||||
if [[ $arch && ! -f /tmp/a2server-compileAlways ]]; then
|
if [[ $arch && ! -f /tmp/a2server-compileAlways ]]; then
|
||||||
{ wget -qO- "${binaryURL}precompiled/nulib2-3.1.0a2-${arch}.tgz" | sudo tar Pzx; } &> /dev/null
|
{ wget -qO- "${binaryURL}precompiled/nulib2-3.1.0a2-${arch}.tgz" | sudo tar Pzx; } &> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! hash nulib2 &> /dev/null; then
|
if ! hash nulib2 &> /dev/null; then
|
||||||
|
|
||||||
if [[ ! -f /tmp/a2server-packageReposUpdated ]]; then
|
if [[ ! -f /tmp/a2server-packageReposUpdated ]]; then
|
||||||
@@ -120,11 +120,11 @@ if ! hash unar &> /dev/null; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# jessie and later: Just use the unar package
|
# jessie and later: Just use the unar package
|
||||||
if [[ $debianName == "jessie" ]]; then
|
if [[ $debianMajor -ge 8 ]]; then
|
||||||
sudo apt-get -y install unar
|
sudo apt-get -y install unar
|
||||||
sudo apt-get clean
|
sudo apt-get clean
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! hash unar &> /dev/null; then
|
if ! hash unar &> /dev/null; then
|
||||||
if [[ $arch && ! -f /tmp/a2server-compileAlways ]]; then
|
if [[ $arch && ! -f /tmp/a2server-compileAlways ]]; then
|
||||||
# Dependencies: for unar
|
# Dependencies: for unar
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
# 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
|
||||||
*/) scriptURL="$A2SERVER_SCRIPT_URL" ;;
|
*/) scriptURL="$A2SERVER_SCRIPT_URL" ;;
|
||||||
*) scriptURL="${A2SERVER_SCRIPT_URL:-https://rawgit.com/RasppleII/a2server/current}/" ;;
|
*) scriptURL="${A2SERVER_SCRIPT_URL:-https://raw.githubusercontent.com/RasppleII/a2server/current}/" ;;
|
||||||
esac
|
esac
|
||||||
case "$A2SERVER_BINARY_URL" in
|
case "$A2SERVER_BINARY_URL" in
|
||||||
*/) binaryURL="$A2SERVER_BINARY_URL" ;;
|
*/) binaryURL="$A2SERVER_BINARY_URL" ;;
|
||||||
@@ -32,7 +32,7 @@ arch=
|
|||||||
if [[ -f /usr/bin/raspi-config ]]; then
|
if [[ -f /usr/bin/raspi-config ]]; then
|
||||||
isRpi=1
|
isRpi=1
|
||||||
arch='rpi'
|
arch='rpi'
|
||||||
elif lsb_release -a 2> /dev/null | grep -q 'Distributor ID:.Debian' && [[ $(cut -c 1 <<< $debianVersion) -ge "7" ]]; then
|
elif lsb_release -a 2> /dev/null | grep -q 'Distributor ID:.Debian' && [[ $(cut -d . -f 1 <<< $debianVersion) -ge "7" ]]; then
|
||||||
uname_m="$(uname -m)"
|
uname_m="$(uname -m)"
|
||||||
if [[ $uname_m == "i686" ]]; then
|
if [[ $uname_m == "i686" ]]; then
|
||||||
arch='debian_x86'
|
arch='debian_x86'
|
||||||
@@ -43,10 +43,10 @@ fi
|
|||||||
|
|
||||||
debianName=
|
debianName=
|
||||||
if [[ $debianVersion ]]; then
|
if [[ $debianVersion ]]; then
|
||||||
debianMajor=$(cut -c 1-2 <<< $debianVersion)
|
debianMajor=$(cut -d . -f 1 <<< $debianVersion)
|
||||||
if [[ $debianMajor == "8." ]]; then
|
if [[ $debianMajor == "8" ]]; then
|
||||||
debianName="jessie"
|
debianName="jessie"
|
||||||
elif [[ $debianMajor == "7." ]]; then
|
elif [[ $debianMajor == "7" ]]; then
|
||||||
debianName="wheezy"
|
debianName="wheezy"
|
||||||
else
|
else
|
||||||
debianName="unknown"
|
debianName="unknown"
|
||||||
@@ -57,17 +57,17 @@ fi
|
|||||||
if [[ -f /usr/local/etc/A2SERVER-version ]] && (( $(head -c 3 /usr/local/etc/A2SERVER-version) >= 101 )); then
|
if [[ -f /usr/local/etc/A2SERVER-version ]] && (( $(head -c 3 /usr/local/etc/A2SERVER-version) >= 101 )); then
|
||||||
|
|
||||||
echo "A2SERVER: Netatalk is already installed."
|
echo "A2SERVER: Netatalk is already installed."
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
echo "A2SERVER: Installing Netatalk (this will take a while)..."
|
echo "A2SERVER: Installing Netatalk (this will take a while)..."
|
||||||
|
|
||||||
# stop Netatalk and samba if running (during upgrade)
|
# stop Netatalk and samba if running (during upgrade)
|
||||||
if [[ $(ps --no-headers -C afpd) ]]; then
|
if [[ $(ps --no-headers -C afpd) ]]; then
|
||||||
sudo /etc/init.d/netatalk stop &> /dev/null
|
sudo /etc/init.d/netatalk stop &> /dev/null
|
||||||
sudo /etc/init.d/samba stop &> /dev/null
|
sudo /etc/init.d/samba stop &> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ ! -f /tmp/a2server-packageReposUpdated ]]; then
|
if [[ ! -f /tmp/a2server-packageReposUpdated ]]; then
|
||||||
# prepare for installing packages
|
# prepare for installing packages
|
||||||
sudo apt-get -y update
|
sudo apt-get -y update
|
||||||
@@ -75,7 +75,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# not being used as of 1.2.9, but it's available if full URL to .deb package is supplied
|
# not being used as of 1.2.9, but it's available if full URL to .deb package is supplied
|
||||||
getOldPackage () {
|
getOldPackage () {
|
||||||
for url in $@; do
|
for url in $@; do
|
||||||
pkgFile=${url##*/}
|
pkgFile=${url##*/}
|
||||||
pkgName=${pkgFile%%_*}
|
pkgName=${pkgFile%%_*}
|
||||||
@@ -112,7 +112,7 @@ else
|
|||||||
else
|
else
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ $(apt-cache search '^libgcrypt11$') ]]; then # Wheezy
|
if [[ $(apt-cache search '^libgcrypt11$') ]]; then # Wheezy
|
||||||
# Dependencies: netatalk 2.2.4
|
# Dependencies: netatalk 2.2.4
|
||||||
sudo apt-get -y install libgcrypt11
|
sudo apt-get -y install libgcrypt11
|
||||||
@@ -122,13 +122,13 @@ else
|
|||||||
else
|
else
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# install Netatalk
|
# install Netatalk
|
||||||
if [[ $arch && ! -f /tmp/a2server-compileAlways ]]; then
|
if [[ $arch && ! -f /tmp/a2server-compileAlways ]]; then
|
||||||
{ wget -qO- "${binaryURL}precompiled/netatalk224-${arch}_${debianName}.tgz" | sudo tar Pzx; } &> /dev/null
|
{ wget -qO- "${binaryURL}precompiled/netatalk224-${arch}_${debianName}.tgz" | sudo tar Pzx; } &> /dev/null
|
||||||
fi
|
fi
|
||||||
sudo mandb &> /dev/null
|
sudo mandb &> /dev/null
|
||||||
|
|
||||||
[[ -f /usr/local/sbin/atalkd ]] && compileFromSource=
|
[[ -f /usr/local/sbin/atalkd ]] && compileFromSource=
|
||||||
|
|
||||||
break
|
break
|
||||||
@@ -157,12 +157,12 @@ else
|
|||||||
sudo apt-get -y install $(apt-cache search '^libgcrypt.*dev$' | sort -r | head -1 | cut -d ' ' -f 1)
|
sudo apt-get -y install $(apt-cache search '^libgcrypt.*dev$' | sort -r | head -1 | cut -d ' ' -f 1)
|
||||||
fi
|
fi
|
||||||
sudo apt-get clean
|
sudo apt-get clean
|
||||||
|
|
||||||
# get Netatalk
|
# get Netatalk
|
||||||
rm -rf /tmp/netatalk &> /dev/null
|
rm -rf /tmp/netatalk &> /dev/null
|
||||||
mkdir /tmp/netatalk
|
mkdir /tmp/netatalk
|
||||||
cd /tmp/netatalk
|
cd /tmp/netatalk
|
||||||
|
|
||||||
if [[ $useExternalURL ]]; then
|
if [[ $useExternalURL ]]; then
|
||||||
wget -qO netatalk-2.2.4.tar.gz "http://downloads.sourceforge.net/project/netatalk/netatalk/2.2.4/netatalk-2.2.4.tar.gz"
|
wget -qO netatalk-2.2.4.tar.gz "http://downloads.sourceforge.net/project/netatalk/netatalk/2.2.4/netatalk-2.2.4.tar.gz"
|
||||||
tar zxf netatalk-2.2.4.tar.gz &> /dev/null
|
tar zxf netatalk-2.2.4.tar.gz &> /dev/null
|
||||||
@@ -172,38 +172,38 @@ else
|
|||||||
tar zxf netatalk-2.2.4.tar.gz &> /dev/null
|
tar zxf netatalk-2.2.4.tar.gz &> /dev/null
|
||||||
fi
|
fi
|
||||||
cd netatalk-2.2.4
|
cd netatalk-2.2.4
|
||||||
|
|
||||||
# Patch the source so file dates are preserved during a GS/OS folder copy,
|
# Patch the source so file dates are preserved during a GS/OS folder copy,
|
||||||
# and the AsanteTalk bridge consistently starts up in AppleTalk Phase 2
|
# and the AsanteTalk bridge consistently starts up in AppleTalk Phase 2
|
||||||
# and the Dayna bridge doesn't crash GS/OS
|
# and the Dayna bridge doesn't crash GS/OS
|
||||||
# props to Steven Hirsch for these
|
# props to Steven Hirsch for these
|
||||||
sed -i ':a;N;$!ba;s/case FILPBIT_ATTR :\n *change_mdate = 1;\n/case FILPBIT_ATTR :\n/g' etc/afpd/file.c
|
sed -i ':a;N;$!ba;s/case FILPBIT_ATTR :\n *change_mdate = 1;\n/case FILPBIT_ATTR :\n/g' etc/afpd/file.c
|
||||||
sed -i 's/rtmp->rt_iface == iface/rtmp->rt_iface != iface/g' etc/atalkd/main.c
|
sed -i 's/rtmp->rt_iface == iface/rtmp->rt_iface != iface/g' etc/atalkd/main.c
|
||||||
|
|
||||||
# prepare to build Netatalk
|
# prepare to build Netatalk
|
||||||
./configure --enable-debian --enable-ddp --enable-a2boot
|
./configure --enable-debian --enable-ddp --enable-a2boot
|
||||||
|
|
||||||
# uninstall Netatalk if already installed
|
# uninstall Netatalk if already installed
|
||||||
[[ -f /usr/local/sbin/afpd ]] && sudo make uninstall
|
[[ -f /usr/local/sbin/afpd ]] && sudo make uninstall
|
||||||
|
|
||||||
# compile and install Netatalk
|
# compile and install Netatalk
|
||||||
make
|
make
|
||||||
sudo make install
|
sudo make install
|
||||||
|
|
||||||
# to remove the Netatalk source code (optional), type:
|
# to remove the Netatalk source code (optional), type:
|
||||||
cd
|
cd
|
||||||
rm -rf /tmp/netatalk
|
rm -rf /tmp/netatalk
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# --- Install MacIPgw
|
# --- Install MacIPgw
|
||||||
if ! hash macipgw &> /dev/null; then
|
if ! hash macipgw &> /dev/null; then
|
||||||
echo "A2SERVER: Installing TCP over AppleTalk (MacIP)..."
|
echo "A2SERVER: Installing TCP over AppleTalk (MacIP)..."
|
||||||
|
|
||||||
if [[ $arch && ! -f /tmp/a2server-compileAlways ]]; then
|
if [[ $arch && ! -f /tmp/a2server-compileAlways ]]; then
|
||||||
{ wget -qO- "${binaryURL}precompiled/macipgw-${arch}.tgz" | sudo tar Pzx; } 2> /dev/null
|
{ wget -qO- "${binaryURL}precompiled/macipgw-${arch}.tgz" | sudo tar Pzx; } 2> /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! hash macipgw &> /dev/null; then
|
if ! hash macipgw &> /dev/null; then
|
||||||
wd="$PWD"
|
wd="$PWD"
|
||||||
sudo apt-get -y install build-essential
|
sudo apt-get -y install build-essential
|
||||||
@@ -229,7 +229,7 @@ if ! hash macipgw &> /dev/null; then
|
|||||||
else
|
else
|
||||||
echo "A2SERVER: TCP over AppleTalk (MacIP) has already been installed."
|
echo "A2SERVER: TCP over AppleTalk (MacIP) has already been installed."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# --- Configuring Netatalk
|
# --- Configuring Netatalk
|
||||||
|
|
||||||
echo "A2SERVER: Configuring Netatalk..."
|
echo "A2SERVER: Configuring Netatalk..."
|
||||||
@@ -448,7 +448,7 @@ if [[ ! -d /srv/A2SERVER/A2FILES/.AppleDesktop ]]; then
|
|||||||
mkdir .AppleDesktop
|
mkdir .AppleDesktop
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# set up ADTDISKS share (ADTPro disk image folder, if A2CLOUD is installed)
|
# set up ADTDISKS share (ADTPro disk image folder, if A2CLOUD is installed)
|
||||||
# classic Mac OS file names are allowed (31 chars, mixed case, everything but colons)
|
# classic Mac OS file names are allowed (31 chars, mixed case, everything but colons)
|
||||||
if [[ -d /usr/local/adtpro/disks ]]; then # A2CLOUD/ADTPro installed
|
if [[ -d /usr/local/adtpro/disks ]]; then # A2CLOUD/ADTPro installed
|
||||||
if [[ ! -d /srv/A2SERVER/ADTDISKS ]]; then
|
if [[ ! -d /srv/A2SERVER/ADTDISKS ]]; then
|
||||||
@@ -479,7 +479,7 @@ else
|
|||||||
echo
|
echo
|
||||||
echo "A2SERVER: Setting up AFP password 'apple2' for Apple II and Mac clients..."
|
echo "A2SERVER: Setting up AFP password 'apple2' for Apple II and Mac clients..."
|
||||||
# echo "A2SERVER: Enter 'apple2' or another password of up to eight characters."
|
# echo "A2SERVER: Enter 'apple2' or another password of up to eight characters."
|
||||||
echo
|
echo
|
||||||
# set registered user login using RandNum authentication
|
# set registered user login using RandNum authentication
|
||||||
sudo afppasswd -c
|
sudo afppasswd -c
|
||||||
sudo sed -i "s/^\(${USER}\).*$/\1:6170706C65320000:****************:********/" /usr/local/etc/netatalk/afppasswd
|
sudo sed -i "s/^\(${USER}\).*$/\1:6170706C65320000:****************:********/" /usr/local/etc/netatalk/afppasswd
|
||||||
@@ -625,8 +625,8 @@ echo "A2SERVER: Netatalk is installed, configured, and running."
|
|||||||
echo
|
echo
|
||||||
|
|
||||||
# if atalkd isn't running (no AppleTalk), and this is a Rasbperry Pi:
|
# if atalkd isn't running (no AppleTalk), and this is a Rasbperry Pi:
|
||||||
if [[ ( ! $(ps aux | grep [a]talkd) ) && ( $isRpi ) ]]; then
|
if [[ ( ! $(ps aux | grep [a]talkd) ) && ( $isRpi ) ]]; then
|
||||||
|
|
||||||
# if AppleTalk module exists, try to load it
|
# if AppleTalk module exists, try to load it
|
||||||
if [[ -f /lib/modules/$kernelRelease/kernel/net/appletalk/appletalk.ko ]]; then # module present, but not loaded?
|
if [[ -f /lib/modules/$kernelRelease/kernel/net/appletalk/appletalk.ko ]]; then # module present, but not loaded?
|
||||||
sudo depmod
|
sudo depmod
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
# 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
|
||||||
*/) scriptURL="$A2SERVER_SCRIPT_URL" ;;
|
*/) scriptURL="$A2SERVER_SCRIPT_URL" ;;
|
||||||
*) scriptURL="${A2SERVER_SCRIPT_URL:-https://rawgit.com/RasppleII/a2server/current}/" ;;
|
*) scriptURL="${A2SERVER_SCRIPT_URL:-https://raw.githubusercontent.com/RasppleII/a2server/current}/" ;;
|
||||||
esac
|
esac
|
||||||
case "$A2SERVER_BINARY_URL" in
|
case "$A2SERVER_BINARY_URL" in
|
||||||
*/) binaryURL="$A2SERVER_BINARY_URL" ;;
|
*/) binaryURL="$A2SERVER_BINARY_URL" ;;
|
||||||
@@ -88,7 +88,7 @@ checkP8YearTables () {
|
|||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
updateP8YearTables () {
|
updateP8YearTables () {
|
||||||
# JC: 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)
|
# Update ProDOS 8 year table (and spalsh date because may as well)
|
||||||
# Effectively, we're turning p8 into the 6.0.2 or 6.0.3 version here.
|
# Effectively, we're turning p8 into the 6.0.2 or 6.0.3 version here.
|
||||||
@@ -128,7 +128,7 @@ updateP8YearTables () {
|
|||||||
files=("p8" "ProDOS16 Image" "Apple :2f:2fe Boot Blocks" "$gsosDir/System/P8")
|
files=("p8" "ProDOS16 Image" "Apple :2f:2fe Boot Blocks" "$gsosDir/System/P8")
|
||||||
offset1=(3958 7030 7071 3958) # splash screen date
|
offset1=(3958 7030 7071 3958) # splash screen date
|
||||||
offset2=(38 3110 79 38) # year table
|
offset2=(38 3110 79 38) # year table
|
||||||
|
|
||||||
i=0
|
i=0
|
||||||
if [[ $check ]]; then
|
if [[ $check ]]; then
|
||||||
# check if patched -- we're not actually doing this any more; we're always patching
|
# check if patched -- we're not actually doing this any more; we're always patching
|
||||||
@@ -156,7 +156,7 @@ updateP8YearTables () {
|
|||||||
patched=0 # 0 is true
|
patched=0 # 0 is true
|
||||||
fi
|
fi
|
||||||
return $patched
|
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 "\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 "\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 "\xb0\xb2\xad\xc1\xf5\xe7\xad\xb1\xb5" | sudo dd of="ProDOS16 Image" bs=3110 seek=1 conv=notrunc 2> /dev/null
|
||||||
@@ -191,17 +191,17 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
else
|
else
|
||||||
echo "A2SERVER is already set up to boot Apple II computers over the network."
|
echo "A2SERVER is already set up to boot Apple II computers over the network."
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ $autoAnswerYes || ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
|
if [[ $autoAnswerYes || ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
|
||||||
|
|
||||||
nbmode=1
|
nbmode=1
|
||||||
echo
|
echo
|
||||||
|
|
||||||
sudo true
|
sudo true
|
||||||
mkdir -p /tmp/netboot
|
mkdir -p /tmp/netboot
|
||||||
rm -r /tmp/netboot/* 2> /dev/null
|
rm -r /tmp/netboot/* 2> /dev/null
|
||||||
cd /tmp/netboot
|
cd /tmp/netboot
|
||||||
|
|
||||||
# this will get "Disk 7" (Apple II Setup) as a raw (block dump) image
|
# this will get "Disk 7" (Apple II Setup) as a raw (block dump) image
|
||||||
if [[ ! -f /usr/local/etc/netatalk/a2boot/ProDOS16\ Boot\ Blocks ]] \
|
if [[ ! -f /usr/local/etc/netatalk/a2boot/ProDOS16\ Boot\ Blocks ]] \
|
||||||
|| [[ ! -f /usr/local/etc/netatalk/a2boot/ProDOS16\ Image ]] \
|
|| [[ ! -f /usr/local/etc/netatalk/a2boot/ProDOS16\ Image ]] \
|
||||||
@@ -210,7 +210,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
|| [[ ! -f /usr/local/etc/netatalk/a2boot/Basic.System ]]; then
|
|| [[ ! -f /usr/local/etc/netatalk/a2boot/Basic.System ]]; then
|
||||||
echo "A2SERVER: Downloading Apple II Boot Blocks..."
|
echo "A2SERVER: Downloading Apple II Boot Blocks..."
|
||||||
cd /tmp/netboot
|
cd /tmp/netboot
|
||||||
|
|
||||||
if [[ $useExternalURL ]]; then
|
if [[ $useExternalURL ]]; then
|
||||||
wget --max-redirect 0 -qO Disk_7_of_7-Apple_II_Setup.sea.bin ${gsosURL}Disk_7_of_7-Apple_II_Setup.sea.bin
|
wget --max-redirect 0 -qO Disk_7_of_7-Apple_II_Setup.sea.bin ${gsosURL}Disk_7_of_7-Apple_II_Setup.sea.bin
|
||||||
unar -k skip Disk_7_of_7-Apple_II_Setup.sea.bin &> /dev/null
|
unar -k skip Disk_7_of_7-Apple_II_Setup.sea.bin &> /dev/null
|
||||||
@@ -225,7 +225,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
fi
|
fi
|
||||||
truncate -s 819284 'Disk 7 of 7-Apple II Setup.sea'
|
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
|
dd if='Disk 7 of 7-Apple II Setup.sea' of=APPLE2SETUP.HDV bs=84 skip=1 2> /dev/null
|
||||||
|
|
||||||
mkdir -p a2setup
|
mkdir -p a2setup
|
||||||
sudo mount -t hfs -o ro,loop APPLE2SETUP.HDV a2setup
|
sudo mount -t hfs -o ro,loop APPLE2SETUP.HDV a2setup
|
||||||
sudo mkdir -p /usr/local/etc/netatalk/a2boot
|
sudo mkdir -p /usr/local/etc/netatalk/a2boot
|
||||||
@@ -233,8 +233,8 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
sudo cp -p a2setup/System\ Folder/* /usr/local/etc/netatalk/a2boot
|
sudo cp -p a2setup/System\ Folder/* /usr/local/etc/netatalk/a2boot
|
||||||
sudo umount a2setup
|
sudo umount a2setup
|
||||||
sudo mv /usr/local/etc/netatalk/a2boot/Apple* /usr/local/etc/netatalk/a2boot/'Apple :2f:2fe Boot Blocks'
|
sudo mv /usr/local/etc/netatalk/a2boot/Apple* /usr/local/etc/netatalk/a2boot/'Apple :2f:2fe Boot Blocks'
|
||||||
|
|
||||||
cd /usr/local/etc/netatalk/a2boot
|
cd /usr/local/etc/netatalk/a2boot
|
||||||
# thanks to Geoff Body for these Boot Blocks patches
|
# thanks to Geoff Body for these Boot Blocks patches
|
||||||
# fix cleartext password login bug
|
# fix cleartext password login bug
|
||||||
echo -n -e "\xA8\xA2\x01\xBD\x80\x38\x99\xA0\x38\xC8\xE8\xE0\x09\x90\xF4" | \
|
echo -n -e "\xA8\xA2\x01\xBD\x80\x38\x99\xA0\x38\xC8\xE8\xE0\x09\x90\xF4" | \
|
||||||
@@ -248,7 +248,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
sudo dd of='ProDOS16 Image' bs=1661 seek=1 conv=notrunc 2> /dev/null
|
sudo dd of='ProDOS16 Image' bs=1661 seek=1 conv=notrunc 2> /dev/null
|
||||||
fi
|
fi
|
||||||
echo "A2SERVER: Boot Blocks have been installed."
|
echo "A2SERVER: Boot Blocks have been installed."
|
||||||
|
|
||||||
# get a2server-tools if necessary
|
# get a2server-tools if necessary
|
||||||
if [[ ! -f /usr/local/bin/mkatinit ]] \
|
if [[ ! -f /usr/local/bin/mkatinit ]] \
|
||||||
|| [[ ! -f /usr/local/bin/afptype ]] \
|
|| [[ ! -f /usr/local/bin/afptype ]] \
|
||||||
@@ -261,12 +261,12 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
/tmp/2.tools
|
/tmp/2.tools
|
||||||
rm /tmp/2.tools
|
rm /tmp/2.tools
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# put BASIC.SYSTEM at root for ProDOS 8 startup
|
# put BASIC.SYSTEM at root for ProDOS 8 startup
|
||||||
cp -p /usr/local/etc/netatalk/a2boot/Basic.System $gsosDir/BASIC.System
|
cp -p /usr/local/etc/netatalk/a2boot/Basic.System $gsosDir/BASIC.System
|
||||||
afpsync -v $gsosDir > /dev/null
|
afpsync -v $gsosDir > /dev/null
|
||||||
afptype -p SYS -q $gsosDir/BASIC.System
|
afptype -p SYS -q $gsosDir/BASIC.System
|
||||||
|
|
||||||
# create tools for setting GS/OS or ProDOS 8 boot in battery RAM and rebooting. Props yet again to Geoff Body.
|
# create tools for setting GS/OS or ProDOS 8 boot in battery RAM and rebooting. Props yet again to Geoff Body.
|
||||||
if [[ ! -f $p8Dir/NETBOOT.P8 ]]; then
|
if [[ ! -f $p8Dir/NETBOOT.P8 ]]; then
|
||||||
echo
|
echo
|
||||||
@@ -287,7 +287,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
afpsync -v $gsosDir > /dev/null
|
afpsync -v $gsosDir > /dev/null
|
||||||
afptype -p SYS -q $gsosDir/NETBOOT.GSOS
|
afptype -p SYS -q $gsosDir/NETBOOT.GSOS
|
||||||
fi
|
fi
|
||||||
|
|
||||||
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)
|
||||||
|
|
||||||
@@ -329,7 +329,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
afpsync &> /dev/null
|
afpsync &> /dev/null
|
||||||
echo
|
echo
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
gsosInstall=1
|
gsosInstall=1
|
||||||
@@ -340,11 +340,22 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
|
|
||||||
if [[ $gsosReinstall ]]; then
|
if [[ $gsosReinstall ]]; then
|
||||||
if [[ ! $autoAnswerYes ]]; then
|
if [[ ! $autoAnswerYes ]]; then
|
||||||
|
echo
|
||||||
echo "You can set up GS/OS for network boot. This may take a while."
|
echo "You can set up GS/OS for network boot. This may take a while."
|
||||||
echo "0: don't install GS/OS"
|
echo
|
||||||
echo "1: GS/OS 6.0.1 (official Apple release, May 1993)"
|
echo " 0: don't install GS/OS"
|
||||||
echo "2: GS/OS 6.0.2 (community release by Antoine Vignau, July 2015)"
|
echo " 1: GS/OS 6.0.1 (May 1993) [official release]"
|
||||||
echo "3: GS/OS 6.0.3 (community release by Tony Diaz, August 2015)"
|
echo " The final version authorized by Apple. It has a few bugs,"
|
||||||
|
echo " but most of these can be patched. Predictable and might be"
|
||||||
|
echo " required if you use certain patches."
|
||||||
|
echo " 2: GS/OS 6.0.2 (Jul 2015)"
|
||||||
|
echo " A community effort released by Antoine Vignau with fixes for"
|
||||||
|
echo " some serious bugs and a few other enhancements."
|
||||||
|
echo " 3: GS/OS 6.0.3 (Aug 2015)"
|
||||||
|
echo " Continuing community effort released by Tony Diaz. Includes"
|
||||||
|
echo " previous work along with additional fixes/changes. Better"
|
||||||
|
echo " documentation of changes. Most will prefer this or Apple's"
|
||||||
|
echo " release above."
|
||||||
echo
|
echo
|
||||||
echo -n "Which flavor would you like? "
|
echo -n "Which flavor would you like? "
|
||||||
read
|
read
|
||||||
@@ -352,7 +363,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
[[ $autoAnswerYes ]] && gsosVersion=1
|
[[ $autoAnswerYes ]] && gsosVersion=1
|
||||||
if [[ $REPLY == "1" || $REPLY == "2" || $REPLY == "3" ]]; then
|
if [[ $REPLY == "1" || $REPLY == "2" || $REPLY == "3" ]]; then
|
||||||
gsosInstall=$REPLY
|
gsosInstall=$REPLY
|
||||||
|
|
||||||
if [[ gsosInstall -gt 1 ]]; then
|
if [[ gsosInstall -gt 1 ]]; then
|
||||||
updateP8YearTables
|
updateP8YearTables
|
||||||
fi
|
fi
|
||||||
@@ -368,7 +379,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
mkdir -p $imagesDir
|
mkdir -p $imagesDir
|
||||||
mkdir -p $netInstallDir
|
mkdir -p $netInstallDir
|
||||||
activeDisk=0
|
activeDisk=0
|
||||||
|
|
||||||
diskNames=( Install System.Disk SystemTools1 SystemTools2 Fonts synthLAB )
|
diskNames=( Install System.Disk SystemTools1 SystemTools2 Fonts synthLAB )
|
||||||
if (( $gsosInstall == 1 )); then
|
if (( $gsosInstall == 1 )); then
|
||||||
:
|
:
|
||||||
@@ -379,12 +390,12 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
elif (( $gsosInstall == 3 )); then
|
elif (( $gsosInstall == 3 )); then
|
||||||
gsosURL="ftp://ftp.apple.asimov.net/pub/apple_II/images/gs/os/gsos/Apple_IIGS_System_6.0.3/"
|
gsosURL="ftp://ftp.apple.asimov.net/pub/apple_II/images/gs/os/gsos/Apple_IIGS_System_6.0.3/"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# delete previously downloaded installer
|
# delete previously downloaded installer
|
||||||
rm "$imagesDir/* $imagesDir/.AppleDouble"/* 2> /dev/null
|
rm "$imagesDir/* $imagesDir/.AppleDouble"/* 2> /dev/null
|
||||||
rm "$netInstallDir/* $netInstallDir/.AppleDouble"/* 2> /dev/null
|
rm "$netInstallDir/* $netInstallDir/.AppleDouble"/* 2> /dev/null
|
||||||
afpsync -v $gsosDir > /dev/null
|
afpsync -v $gsosDir > /dev/null
|
||||||
|
|
||||||
for diskname in ${diskNames[@]}; do
|
for diskname in ${diskNames[@]}; do
|
||||||
outfile="$imagesDir/$diskname.po"
|
outfile="$imagesDir/$diskname.po"
|
||||||
(( activeDisk++ ))
|
(( activeDisk++ ))
|
||||||
@@ -423,9 +434,9 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
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/*
|
||||||
|
|
||||||
afpsync -v $gsosDir > /dev/null
|
afpsync -v $gsosDir > /dev/null
|
||||||
|
|
||||||
# install GS/OS
|
# install GS/OS
|
||||||
# spec for GS/OS installer scripts: GS/OS Tech Note #64
|
# spec for GS/OS installer scripts: GS/OS Tech Note #64
|
||||||
# http://www.1000bit.it/support/manuali/apple/technotes/iigs/tn.iigs.064.html
|
# http://www.1000bit.it/support/manuali/apple/technotes/iigs/tn.iigs.064.html
|
||||||
@@ -452,7 +463,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
targetFile=${targetPath##*/}
|
targetFile=${targetPath##*/}
|
||||||
sourceParent=${sourcePath%/*}
|
sourceParent=${sourcePath%/*}
|
||||||
sourceFile=${sourcePath##*/}
|
sourceFile=${sourcePath##*/}
|
||||||
|
|
||||||
if [[ $action == 1 || $action == 2 ]]; then
|
if [[ $action == 1 || $action == 2 ]]; then
|
||||||
mkdir -p $targetParent
|
mkdir -p $targetParent
|
||||||
echo "copying: $sourcePathMixed"
|
echo "copying: $sourcePathMixed"
|
||||||
@@ -473,12 +484,12 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
done
|
done
|
||||||
unset IFS
|
unset IFS
|
||||||
}
|
}
|
||||||
|
|
||||||
mkdir -p /tmp/netboot
|
mkdir -p /tmp/netboot
|
||||||
rm -r /tmp/netboot/* 2> /dev/null
|
rm -r /tmp/netboot/* 2> /dev/null
|
||||||
cd /tmp/netboot
|
cd /tmp/netboot
|
||||||
|
|
||||||
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"
|
echo "Script: Install.Sys.File"
|
||||||
processScript $netInstallDir/Install/Scripts/Instal.Sys.File
|
processScript $netInstallDir/Install/Scripts/Instal.Sys.File
|
||||||
@@ -492,14 +503,14 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
processScript $netInstallDir/Install/Scripts/Appleshare
|
processScript $netInstallDir/Install/Scripts/Appleshare
|
||||||
echo "Script: Server.Sys.File"
|
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
|
else
|
||||||
gsosInstall=
|
gsosInstall=
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if [[ ! $autoAnswerYes && (! $gsosInstall || $gsosInstall -lt 2) ]] && ! checkP8YearTables 603; then
|
# if [[ ! $autoAnswerYes && (! $gsosInstall || $gsosInstall -lt 2) ]] && ! checkP8YearTables 603; then
|
||||||
# echo
|
# echo
|
||||||
# echo -n "Do you want to update the ProDOS 8 Thunderclock year table? "
|
# echo -n "Do you want to update the ProDOS 8 Thunderclock year table? "
|
||||||
@@ -545,11 +556,11 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
fi
|
fi
|
||||||
if [[ $gsosInstalled ]]; then
|
if [[ $gsosInstalled ]]; then
|
||||||
if [[ $autoAnswerYes || ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
|
if [[ $autoAnswerYes || ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
|
||||||
|
|
||||||
# download image tools and put them in IMAGE.TOOLS
|
# download image tools and put them in IMAGE.TOOLS
|
||||||
echo "A2SERVER: Downloading GS/OS disk image utilities..."
|
echo "A2SERVER: Downloading GS/OS disk image utilities..."
|
||||||
mkdir -p $imageToolsDir
|
mkdir -p $imageToolsDir
|
||||||
|
|
||||||
# get Asimov2 (for GS/OS)
|
# get Asimov2 (for GS/OS)
|
||||||
echo -n "Asimov 2.0"
|
echo -n "Asimov 2.0"
|
||||||
if [[ -f $imageToolsDir/Asimov ]]; then
|
if [[ -f $imageToolsDir/Asimov ]]; then
|
||||||
@@ -570,7 +581,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
cat Asimov/Asimov_rsrc_ >> $imageToolsDir/.AppleDouble/Asimov
|
cat Asimov/Asimov_rsrc_ >> $imageToolsDir/.AppleDouble/Asimov
|
||||||
afptype -p S16 -q $imageToolsDir/Asimov
|
afptype -p S16 -q $imageToolsDir/Asimov
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "GS-ShrinkIt 1.1"
|
echo -n "GS-ShrinkIt 1.1"
|
||||||
# get GS-ShrinkIt
|
# get GS-ShrinkIt
|
||||||
if [[ -f $imageToolsDir/GSHK ]]; then
|
if [[ -f $imageToolsDir/GSHK ]]; then
|
||||||
@@ -596,8 +607,8 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
afptype -p S16 -a DB07 -q $imageToolsDir/GSHK
|
afptype -p S16 -a DB07 -q $imageToolsDir/GSHK
|
||||||
cd /tmp/netboot
|
cd /tmp/netboot
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "MountIt 1.4"
|
echo -n "MountIt 1.4"
|
||||||
# get MountIt (for GS/OS)
|
# get MountIt (for GS/OS)
|
||||||
if [[ -f $gsosDir/System/System.Setup/MountIt ]]; then
|
if [[ -f $gsosDir/System/System.Setup/MountIt ]]; then
|
||||||
echo " is already installed."
|
echo " is already installed."
|
||||||
@@ -630,7 +641,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
echo "A2SERVER: Downloading ProDOS 8 disk image utilities..."
|
echo "A2SERVER: Downloading ProDOS 8 disk image utilities..."
|
||||||
|
|
||||||
mkdir -p $diskToolsP8Dir
|
mkdir -p $diskToolsP8Dir
|
||||||
|
|
||||||
echo -n "ShrinkIt 3.4"
|
echo -n "ShrinkIt 3.4"
|
||||||
# get ShrinkIt 3.4 (for ProDOS 8)
|
# get ShrinkIt 3.4 (for ProDOS 8)
|
||||||
if [[ -f $diskToolsP8Dir/SHRINKIT ]]; then
|
if [[ -f $diskToolsP8Dir/SHRINKIT ]]; then
|
||||||
@@ -652,7 +663,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
cppo -s -ad "SHRINKIT#000118i" /SHRINKIT/SHRINKIT $diskToolsP8Dir &> /dev/null
|
cppo -s -ad "SHRINKIT#000118i" /SHRINKIT/SHRINKIT $diskToolsP8Dir &> /dev/null
|
||||||
afpsync -v $sharepath > /dev/null
|
afpsync -v $sharepath > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "DSK2FILE 5.8"
|
echo -n "DSK2FILE 5.8"
|
||||||
# get DSK2FILE (for ProDOS 8)
|
# get DSK2FILE (for ProDOS 8)
|
||||||
if [[ -f $diskToolsP8Dir/DSK2FILE ]]; then
|
if [[ -f $diskToolsP8Dir/DSK2FILE ]]; then
|
||||||
@@ -672,7 +683,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
afpsync -v $sharepath > /dev/null
|
afpsync -v $sharepath > /dev/null
|
||||||
afptype -p SYS -q $diskToolsP8Dir/DSK2FILE
|
afptype -p SYS -q $diskToolsP8Dir/DSK2FILE
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "Apple System Utilities 3.1"
|
echo -n "Apple System Utilities 3.1"
|
||||||
if [[ -f $diskToolsP8Dir/SYSUTIL ]]; then
|
if [[ -f $diskToolsP8Dir/SYSUTIL ]]; then
|
||||||
echo " is already installed."
|
echo " is already installed."
|
||||||
@@ -698,7 +709,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
cppo -s -ad A2SYSDISK32.HDV /UTILITIES/UTIL.2 $diskToolsP8Dir &> /dev/null
|
cppo -s -ad A2SYSDISK32.HDV /UTILITIES/UTIL.2 $diskToolsP8Dir &> /dev/null
|
||||||
afpsync -v $sharepath > /dev/null
|
afpsync -v $sharepath > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
p8CommInstalled=
|
p8CommInstalled=
|
||||||
@@ -724,7 +735,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [[ $autoAnswerYes || ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
|
if [[ $autoAnswerYes || ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]]; then
|
||||||
|
|
||||||
echo "A2SERVER: Downloading communications software..."
|
echo "A2SERVER: Downloading communications software..."
|
||||||
|
|
||||||
mkdir -p $commDir
|
mkdir -p $commDir
|
||||||
@@ -742,7 +753,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
snapVer=$(echo $snapUrl | rev | cut -d '/' -f 1 | cut -d '.' -f 2 | rev | cut -c 5- | 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)
|
spectrumVer=$(echo "$html" | grep 'Spectrum.*Gold.2mg' | tr '<>' '\n' | grep '^Spectrum.*2mg$' | cut -d ' ' -f 2)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "Spectrum $spectrumVer"
|
echo -n "Spectrum $spectrumVer"
|
||||||
# get Spectrum
|
# get Spectrum
|
||||||
if [[ -f $commDir/Spectrum/Spectrum ]]; then
|
if [[ -f $commDir/Spectrum/Spectrum ]]; then
|
||||||
@@ -766,7 +777,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
fi
|
fi
|
||||||
cppo -s -ad Spectrum.Gold.2mg . &> /dev/null
|
cppo -s -ad Spectrum.Gold.2mg . &> /dev/null
|
||||||
userFolder=$(tr [:lower:] [:upper:] <<< $USER)
|
userFolder=$(tr [:lower:] [:upper:] <<< $USER)
|
||||||
|
|
||||||
for thisFolder in \
|
for thisFolder in \
|
||||||
Installer/Extras/CDEvs^System/CDevs \
|
Installer/Extras/CDEvs^System/CDevs \
|
||||||
Installer/Extras/Tools^System/Tools \
|
Installer/Extras/Tools^System/Tools \
|
||||||
@@ -976,7 +987,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
cd .AppleDouble
|
cd .AppleDouble
|
||||||
mv *PT3* *PROTERM* $commDir/ProTERM/.AppleDouble
|
mv *PT3* *PROTERM* $commDir/ProTERM/.AppleDouble
|
||||||
afpsync -v $gsosDir > /dev/null
|
afpsync -v $gsosDir > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "Z-Link 12-15-91"
|
echo -n "Z-Link 12-15-91"
|
||||||
# get A2CLOUD disk and copy from there
|
# get A2CLOUD disk and copy from there
|
||||||
@@ -991,7 +1002,7 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
cd .AppleDouble
|
cd .AppleDouble
|
||||||
mv Z.LINK $commDir/Z.Link/.AppleDouble
|
mv Z.LINK $commDir/Z.Link/.AppleDouble
|
||||||
afpsync -v $gsosDir > /dev/null
|
afpsync -v $gsosDir > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -n "ADTPro 2.0.1"
|
echo -n "ADTPro 2.0.1"
|
||||||
if [[ -f $commDir/ADTPro/ADTPRO ]]; then
|
if [[ -f $commDir/ADTPro/ADTPRO ]]; then
|
||||||
@@ -1005,23 +1016,23 @@ if [[ ! $autoAnswerYes || -f /tmp/a2server-setupNetBoot ]]; then
|
|||||||
cd .AppleDouble
|
cd .AppleDouble
|
||||||
mv *ADTPRO* *VEDRIVE* *VSDRIVE* $commDir/ADTPro/.AppleDouble
|
mv *ADTPRO* *VEDRIVE* *VSDRIVE* $commDir/ADTPro/.AppleDouble
|
||||||
afpsync -v $gsosDir > /dev/null
|
afpsync -v $gsosDir > /dev/null
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# clean up
|
# clean up
|
||||||
cd
|
cd
|
||||||
|
|
||||||
# rock and roll!
|
# rock and roll!
|
||||||
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."
|
||||||
echo "See http://ivanx.com/a2server for info using it."
|
echo "See http://ivanx.com/a2server for info using it."
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
REPLY=
|
REPLY=
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ password="your password"
|
|||||||
[[ $isRaspberryPw ]] && password="'raspberry'"
|
[[ $isRaspberryPw ]] && password="'raspberry'"
|
||||||
|
|
||||||
isDebian=
|
isDebian=
|
||||||
[[ ( -f /etc/debian_version ) && ( $(cut -c 1-2 < /etc/debian_version) == "7." ) && ( $(uname -m) == "i686" ) ]] && isDebian=1
|
b_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
|
||||||
|
|
||||||
if [[ $isDebian ]]; then
|
if [[ $isDebian ]]; then
|
||||||
if { lspci 2> /dev/null | grep -q VirtualBox; }; then
|
if { lspci 2> /dev/null | grep -q VirtualBox; }; then
|
||||||
|
|||||||
@@ -71,7 +71,7 @@ def find_slash_pos(day): # 799 REM Finds position of /
|
|||||||
for i in range(0,3): # 810 FOR I = 1 TO 3
|
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
|
if day[i:i+1] == "/": x = i; break # 820 IF MID$ (DAY$,I,1) = "/" THEN X = I:I = 3
|
||||||
# 830 NEXT I
|
# 830 NEXT I
|
||||||
return x # 840 RETURN
|
return x # 840 RETURN
|
||||||
|
|
||||||
while True: # 999 REM get the user's input and convert
|
while True: # 999 REM get the user's input and convert
|
||||||
if not day:
|
if not day:
|
||||||
@@ -110,7 +110,7 @@ while True: # 999 REM get the user's input
|
|||||||
mo == 2 and
|
mo == 2 and
|
||||||
da > 28): x = -1; continue
|
da > 28): x = -1; continue
|
||||||
input_ok = True
|
input_ok = True
|
||||||
if x != -1: break
|
if x != -1: break
|
||||||
else: dow_str = ""; day = ""
|
else: dow_str = ""; day = ""
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ if [[ \
|
|||||||
${partitions[1]:0:14} == "/dev/mmcblk0p2" && ${partitions[1]:57:2} == "85" &&
|
${partitions[1]:0:14} == "/dev/mmcblk0p2" && ${partitions[1]:57:2} == "85" &&
|
||||||
${partitions[2]:0:14} == "/dev/mmcblk0p3" && ${partitions[2]:57:2} == "83" &&
|
${partitions[2]:0:14} == "/dev/mmcblk0p3" && ${partitions[2]:57:2} == "83" &&
|
||||||
${partitions[3]:0:14} == "/dev/mmcblk0p5" && ${partitions[3]:57:2} == " c" &&
|
${partitions[3]:0:14} == "/dev/mmcblk0p5" && ${partitions[3]:57:2} == " c" &&
|
||||||
${partitions[4]:0:14} == "/dev/mmcblk0p6" && ${partitions[4]:57:2} == "83" ]]; then
|
${partitions[4]:0:14} == "/dev/mmcblk0p6" && ${partitions[4]:57:2} == "83" ]]; then
|
||||||
noobs=" and the NOOBS install manager"
|
noobs=" and the NOOBS install manager"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ if [[ ! $noobsOnly ]]; then
|
|||||||
{ cd /tmp; sudo apt-get -y autoremove; sudo apt-get -y autoclean; sudo apt-get -y clean; } > /dev/null
|
{ cd /tmp; sudo apt-get -y autoremove; sudo apt-get -y autoclean; sudo apt-get -y clean; } > /dev/null
|
||||||
freeSpace=$(df / | tail -1 | awk '{ print $4 }')
|
freeSpace=$(df / | tail -1 | awk '{ print $4 }')
|
||||||
if (( $freeSpace < 400000 )); then
|
if (( $freeSpace < 400000 )); then
|
||||||
if dpkg -l | grep -q wolfram-engine; then
|
if dpkg -l | grep -q wolfram-engine; then
|
||||||
if [[ ! $autoYes ]]; then
|
if [[ ! $autoYes ]]; then
|
||||||
echo "In order to create enough space on your SD card to upgrade,"
|
echo "In order to create enough space on your SD card to upgrade,"
|
||||||
echo "the Wolfram Language and Mathematica software packages must be removed."
|
echo "the Wolfram Language and Mathematica software packages must be removed."
|
||||||
@@ -179,7 +179,7 @@ if [[ $noobs ]]; then
|
|||||||
grep -q 'disablesafemode' /tmp/p1/recovery.cmdline || sudo sed -i '1 s/^\(.*\)$/\1 disablesafemode/' /tmp/p1/recovery.cmdline
|
grep -q 'disablesafemode' /tmp/p1/recovery.cmdline || sudo sed -i '1 s/^\(.*\)$/\1 disablesafemode/' /tmp/p1/recovery.cmdline
|
||||||
sudo umount /tmp/p1
|
sudo umount /tmp/p1
|
||||||
rmdir /tmp/p1
|
rmdir /tmp/p1
|
||||||
|
|
||||||
sudo sed -i 's/\(Raspple II release.*[^u]$\)/\1u/' /etc/issue
|
sudo sed -i 's/\(Raspple II release.*[^u]$\)/\1u/' /etc/issue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -2,17 +2,17 @@
|
|||||||
# vim: set tabstop=4 shiftwidth=4 expandtab filetype=sh:
|
# vim: set tabstop=4 shiftwidth=4 expandtab filetype=sh:
|
||||||
|
|
||||||
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:-https://rawgit.com/RasppleII/a2server/current/}setup/index.txt || { echo "Can'"'"'t download A2SERVER setup scripts. Do you has internet?"; false; } && source /tmp/a2server-setup'
|
alias a2server-setup='wget -q -O /tmp/a2server-setup ${A2SERVER_SCRIPT_URL:-https://raw.githubusercontent.com/RasppleII/a2server/current/}setup/index.txt || { 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:-https://rawgit.com/RasppleII/a2server/current/}update/index.txt || { echo "Can'"'"'t download A2SERVER setup scripts. Do you has internet?"; false; } && source /tmp/a2server-update'
|
alias a2server-update='wget -q -O /tmp/a2server-update ${A2SERVER_SCRIPT_URL:-https://raw.githubusercontent.com/RasppleII/a2server/current/}update/index.txt || { 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'
|
||||||
|
|
||||||
|
|
||||||
alias raspi-config='[[ -f /usr/bin/raspi-config ]] && sudo /usr/bin/raspi-config || echo "raspi-config not found. Are you using a Raspberry Pi with Raspbian?"'
|
alias raspi-config='[[ -f /usr/bin/raspi-config ]] && sudo /usr/bin/raspi-config || echo "raspi-config not found. Are you using a Raspberry Pi with Raspbian?"'
|
||||||
alias raspbian-update='wget -qO /tmp/raspbian-update ${A2SERVER_SCRIPT_URL:-https://rawgit.com/RasppleII/a2server/current/}scripts/raspbian-update.txt || { echo "Can'"'"'t download A2SERVER setup scripts. Do you has internet?"; false; } && source /tmp/raspbian-update'
|
alias raspbian-update='wget -qO /tmp/raspbian-update ${A2SERVER_SCRIPT_URL:-https://raw.githubusercontent.com/RasppleII/a2server/current/}scripts/raspbian-update.txt || { echo "Can'"'"'t download A2SERVER setup scripts. Do you has internet?"; false; } && source /tmp/raspbian-update'
|
||||||
alias rasppleii-update='raspbian-update a2cloud a2server'
|
alias rasppleii-update='raspbian-update a2cloud a2server'
|
||||||
|
|
||||||
alias welcome-message-edit='sudo nano /etc/motd'
|
alias welcome-message-edit='sudo nano /etc/motd'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#! /bin/bash
|
#! /bin/bash
|
||||||
# vim: set tabstop=4 shiftwidth=4 expandtab filetype=sh:
|
# vim: set tabstop=4 shiftwidth=4 expandtab filetype=sh:
|
||||||
|
|
||||||
export A2SERVER_SCRIPT_URL="${A2SERVER_SCRIPT_URL:-https://rawgit.com/RasppleII/a2server/current/}"
|
export A2SERVER_SCRIPT_URL="${A2SERVER_SCRIPT_URL:-https://raw.githubusercontent.com/RasppleII/a2server/current/}"
|
||||||
export A2SERVER_BINARY_URL="${A2SERVER_BINARY_URL:-http://ivanx.com/a2server/files/}"
|
export A2SERVER_BINARY_URL="${A2SERVER_BINARY_URL:-http://ivanx.com/a2server/files/}"
|
||||||
source /usr/local/etc/a2server-aliases
|
source /usr/local/etc/a2server-aliases
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ options:
|
|||||||
-e : Nulib2-compatible filenames with type/auxtype and resource forks.
|
-e : Nulib2-compatible filenames with type/auxtype and resource forks.
|
||||||
-uc : Copy GS/OS mixed case filenames as uppercase.
|
-uc : Copy GS/OS mixed case filenames as uppercase.
|
||||||
-pro: Adapt DOS 3.3 names to ProDOS and remove addr/len from file data.
|
-pro: Adapt DOS 3.3 names to ProDOS and remove addr/len from file data.
|
||||||
|
|
||||||
/extract/path examples:
|
/extract/path examples:
|
||||||
/FULL/PRODOS/PATH (ProDOS image source)
|
/FULL/PRODOS/PATH (ProDOS image source)
|
||||||
"MY FILENAME" (DOS 3.3 image source)
|
"MY FILENAME" (DOS 3.3 image source)
|
||||||
@@ -125,7 +125,7 @@ def unixDateToADDate(arg1):
|
|||||||
# returns byte position in disk image file
|
# returns byte position in disk image file
|
||||||
def getStartPos(arg1, arg2):
|
def getStartPos(arg1, arg2):
|
||||||
if g.D33:
|
if g.D33:
|
||||||
return (ts(arg1) + (35 * (arg2 % 7)) + 11)
|
return (ts(arg1) + (35 * (arg2 % 7)) + 11)
|
||||||
else: # ProDOS
|
else: # ProDOS
|
||||||
return ( (arg1 * 512) +
|
return ( (arg1 * 512) +
|
||||||
(39 * ((arg2 + (arg2 > 11)) % 13)) +
|
(39 * ((arg2 + (arg2 > 11)) % 13)) +
|
||||||
@@ -154,7 +154,7 @@ def getFileName(arg1, arg2):
|
|||||||
for i in range(0, len(fileName)):
|
for i in range(0, len(fileName)):
|
||||||
if (caseMask[i] == "1"):
|
if (caseMask[i] == "1"):
|
||||||
fileName = (fileName[:i] +
|
fileName = (fileName[:i] +
|
||||||
fileName[i:i+1].lower() +
|
fileName[i:i+1].lower() +
|
||||||
fileName[i+1:])
|
fileName[i+1:])
|
||||||
return fileName
|
return fileName
|
||||||
|
|
||||||
@@ -208,7 +208,7 @@ def getKeyPointer(arg1, arg2):
|
|||||||
start = getStartPos(arg1, arg2)
|
start = getStartPos(arg1, arg2)
|
||||||
if g.D33:
|
if g.D33:
|
||||||
return [readcharDec(g.imageData, start+0),
|
return [readcharDec(g.imageData, start+0),
|
||||||
readcharDec(g.imageData, start+1)]
|
readcharDec(g.imageData, start+1)]
|
||||||
else: # ProDOS
|
else: # ProDOS
|
||||||
return (readcharDec(g.imageData, start+17) +
|
return (readcharDec(g.imageData, start+17) +
|
||||||
readcharDec(g.imageData, start+18)*256)
|
readcharDec(g.imageData, start+18)*256)
|
||||||
@@ -228,7 +228,7 @@ def getFileLength(arg1, arg2):
|
|||||||
elif (fileType == 'FC' or fileType == 'FA'): # BAS (A) or INT (I)
|
elif (fileType == 'FC' or fileType == 'FA'): # BAS (A) or INT (I)
|
||||||
# file length is in first two bytes of file data
|
# file length is in first two bytes of file data
|
||||||
return ((readcharDec(g.imageData, ts(fileStart)+0) +
|
return ((readcharDec(g.imageData, ts(fileStart)+0) +
|
||||||
readcharDec(g.imageData, ts(fileStart)+1)*256) + 2)
|
readcharDec(g.imageData, ts(fileStart)+1)*256) + 2)
|
||||||
else: # TXT (T) or other
|
else: # TXT (T) or other
|
||||||
# sadly, we have to walk the whole file
|
# sadly, we have to walk the whole file
|
||||||
# length is determined by sectors in TSlist, minus wherever
|
# length is determined by sectors in TSlist, minus wherever
|
||||||
@@ -338,7 +338,7 @@ def getWorkingDirName(arg1, arg2=None):
|
|||||||
for i in range(0, len(workingDirName)):
|
for i in range(0, len(workingDirName)):
|
||||||
if (caseMask[i] == "1"):
|
if (caseMask[i] == "1"):
|
||||||
workingDirName = (workingDirName[:i] +
|
workingDirName = (workingDirName[:i] +
|
||||||
workingDirName[i:i+1].lower() +
|
workingDirName[i:i+1].lower() +
|
||||||
workingDirName[i+1:])
|
workingDirName[i+1:])
|
||||||
return workingDirName
|
return workingDirName
|
||||||
|
|
||||||
@@ -399,7 +399,7 @@ def ts(track, sector=None):
|
|||||||
if isinstance(sector, type("".encode("L1").decode("L1"))): # hex-ustr
|
if isinstance(sector, type("".encode("L1").decode("L1"))): # hex-ustr
|
||||||
sector = int(sector, 16)
|
sector = int(sector, 16)
|
||||||
return (track*16*256)+(sector*256)
|
return (track*16*256)+(sector*256)
|
||||||
|
|
||||||
# --- main logic functions
|
# --- main logic functions
|
||||||
|
|
||||||
def copyFile(arg1, arg2):
|
def copyFile(arg1, arg2):
|
||||||
@@ -409,7 +409,7 @@ def copyFile(arg1, arg2):
|
|||||||
# ShrinkIt: directory path / file name
|
# ShrinkIt: directory path / file name
|
||||||
# copies file or dfork to g.outFileData, rfork if any to g.exFileData
|
# copies file or dfork to g.outFileData, rfork if any to g.exFileData
|
||||||
g.activeFileBytesCopied = 0
|
g.activeFileBytesCopied = 0
|
||||||
|
|
||||||
if g.SHK:
|
if g.SHK:
|
||||||
with open(os.path.join(arg1, arg2), 'rb') as infile:
|
with open(os.path.join(arg1, arg2), 'rb') as infile:
|
||||||
g.outFileData += infile.read()
|
g.outFileData += infile.read()
|
||||||
@@ -523,7 +523,7 @@ def processEntry(arg1, arg2):
|
|||||||
getFileLength(arg1, arg2), getAuxType(arg1, arg2),
|
getFileLength(arg1, arg2), getAuxType(arg1, arg2),
|
||||||
getCreationDate(arg1, arg2), getModifiedDate(arg1, arg2))
|
getCreationDate(arg1, arg2), getModifiedDate(arg1, arg2))
|
||||||
'''
|
'''
|
||||||
|
|
||||||
eTargetName = None
|
eTargetName = None
|
||||||
g.exFileData = None
|
g.exFileData = None
|
||||||
g.outFileData = bytearray(b'')
|
g.outFileData = bytearray(b'')
|
||||||
@@ -541,7 +541,7 @@ def processEntry(arg1, arg2):
|
|||||||
|
|
||||||
if (not g.PDOSPATH_INDEX or
|
if (not g.PDOSPATH_INDEX or
|
||||||
g.activeFileName.upper() == g.PDOSPATH_SEGMENT.upper()):
|
g.activeFileName.upper() == g.PDOSPATH_SEGMENT.upper()):
|
||||||
|
|
||||||
# if ProDOS directory, not file
|
# if ProDOS directory, not file
|
||||||
if (not g.SHK and getStorageType(arg1, arg2) == 13):
|
if (not g.SHK and getStorageType(arg1, arg2) == 13):
|
||||||
if not g.PDOSPATH_INDEX:
|
if not g.PDOSPATH_INDEX:
|
||||||
@@ -620,7 +620,7 @@ def processEntry(arg1, arg2):
|
|||||||
writecharsHex(g.exFileData,
|
writecharsHex(g.exFileData,
|
||||||
654,
|
654,
|
||||||
getFileType(arg1, arg2) +
|
getFileType(arg1, arg2) +
|
||||||
getAuxType(arg1, arg2))
|
getAuxType(arg1, arg2))
|
||||||
writechars(g.exFileData, 657, b'pdos')
|
writechars(g.exFileData, 657, b'pdos')
|
||||||
saveFile(ADfilePath, g.exFileData)
|
saveFile(ADfilePath, g.exFileData)
|
||||||
touch(saveName, modifiedDate)
|
touch(saveName, modifiedDate)
|
||||||
@@ -632,7 +632,7 @@ def processEntry(arg1, arg2):
|
|||||||
(g.extractFile and
|
(g.extractFile and
|
||||||
(g.extractFile.lower() == origFileName.lower()))):
|
(g.extractFile.lower() == origFileName.lower()))):
|
||||||
quitNow(0)
|
quitNow(0)
|
||||||
g.targetName = None
|
g.targetName = None
|
||||||
#else:
|
#else:
|
||||||
#print(g.activeFileName + " doesn't match " + g.PDOSPATH_SEGMENT)
|
#print(g.activeFileName + " doesn't match " + g.PDOSPATH_SEGMENT)
|
||||||
|
|
||||||
@@ -750,9 +750,9 @@ def quitNow(exitCode=0):
|
|||||||
"If the directory")
|
"If the directory")
|
||||||
print("is shared by Netatalk, please type 'afpsync' now.")
|
print("is shared by Netatalk, please type 'afpsync' now.")
|
||||||
if g.SHK: # clean up
|
if g.SHK: # clean up
|
||||||
for file in os.listdir(tempfile.gettempdir()):
|
for file in os.listdir('/tmp'):
|
||||||
if file.startswith("cppo-"):
|
if file.startswith("cppo-"):
|
||||||
shutil.rmtree(tempfile.gettempdir() + "/" + file)
|
shutil.rmtree('/tmp' + "/" + file)
|
||||||
sys.exit(exitCode)
|
sys.exit(exitCode)
|
||||||
|
|
||||||
def usage(exitcode=1):
|
def usage(exitcode=1):
|
||||||
@@ -791,7 +791,7 @@ def binToDec(arg1):
|
|||||||
# arg: binary string up to 8 bits
|
# arg: binary string up to 8 bits
|
||||||
# out: decimal value
|
# out: decimal value
|
||||||
return to_dec([arg1])
|
return to_dec([arg1])
|
||||||
|
|
||||||
def binToHex(arg1):
|
def binToHex(arg1):
|
||||||
# converts single-byte binary string (8 bits) value to hex
|
# converts single-byte binary string (8 bits) value to hex
|
||||||
# warning: no error checking
|
# warning: no error checking
|
||||||
@@ -994,10 +994,10 @@ def to_bytes(val):
|
|||||||
else:
|
else:
|
||||||
raise Exception(
|
raise Exception(
|
||||||
"to_bytes() requires hex-ustr, int/long, or [bin-ustr]")
|
"to_bytes() requires hex-ustr, int/long, or [bin-ustr]")
|
||||||
|
|
||||||
def shift(items):
|
def shift(items):
|
||||||
"""Shift list items to left, losing the first item.
|
"""Shift list items to left, losing the first item.
|
||||||
|
|
||||||
in : list
|
in : list
|
||||||
out: list
|
out: list
|
||||||
"""
|
"""
|
||||||
@@ -1005,7 +1005,7 @@ def shift(items):
|
|||||||
items[i] = items[i+1]
|
items[i] = items[i+1]
|
||||||
del items[-1]
|
del items[-1]
|
||||||
return items
|
return items
|
||||||
|
|
||||||
def s(string):
|
def s(string):
|
||||||
"""Perform local variable substution, e.g. 'total: {num} items'"""
|
"""Perform local variable substution, e.g. 'total: {num} items'"""
|
||||||
# http://stackoverflow.com/questions/2960772/
|
# http://stackoverflow.com/questions/2960772/
|
||||||
@@ -1101,14 +1101,14 @@ while True: # breaks when there are no more arguments starting with dash
|
|||||||
|
|
||||||
if (len(args) == 1):
|
if (len(args) == 1):
|
||||||
usage()
|
usage()
|
||||||
|
|
||||||
if (slyce(args[1],0,1) != "-"):
|
if (slyce(args[1],0,1) != "-"):
|
||||||
break
|
break
|
||||||
|
|
||||||
if (args[1] == "-s"):
|
if (args[1] == "-s"):
|
||||||
g.nomsg = 1
|
g.nomsg = 1
|
||||||
args = args[1:] #shift
|
args = args[1:] #shift
|
||||||
|
|
||||||
elif (args[1] == "-n"):
|
elif (args[1] == "-n"):
|
||||||
g.nodir = 1
|
g.nodir = 1
|
||||||
args = args[1:] #shift
|
args = args[1:] #shift
|
||||||
@@ -1121,7 +1121,7 @@ while True: # breaks when there are no more arguments starting with dash
|
|||||||
g.AD = 1
|
g.AD = 1
|
||||||
g.PNAME = 1
|
g.PNAME = 1
|
||||||
args = args[1:] #shift
|
args = args[1:] #shift
|
||||||
|
|
||||||
elif (args[1] == "-shk"):
|
elif (args[1] == "-shk"):
|
||||||
g.SHK = 1
|
g.SHK = 1
|
||||||
args = args[1:] #shift
|
args = args[1:] #shift
|
||||||
@@ -1176,11 +1176,27 @@ if (g.SHK or
|
|||||||
if (len(args) == 4):
|
if (len(args) == 4):
|
||||||
g.extractFile = args[2]
|
g.extractFile = args[2]
|
||||||
|
|
||||||
|
if g.extractFile:
|
||||||
|
targetPath = args[3]
|
||||||
|
if os.path.isdir(targetPath):
|
||||||
|
g.targetDir = targetPath
|
||||||
|
elif (targetPath.rsplit("/", 1) > 1):
|
||||||
|
g.targetDir = targetPath.rsplit("/", 1)[0]
|
||||||
|
g.targetName = targetPath.rsplit("/", 1)[1]
|
||||||
|
if not os.path.isdir(g.targetDir):
|
||||||
|
print("Target directory not found.")
|
||||||
|
quitNow(2)
|
||||||
|
else:
|
||||||
|
if not g.CAT:
|
||||||
|
if not os.path.isdir(args[2]):
|
||||||
|
print("Target directory not found.")
|
||||||
|
quitNow(2)
|
||||||
|
|
||||||
if g.SHK:
|
if g.SHK:
|
||||||
g.PNAME = 0
|
g.PNAME = 0
|
||||||
if not g.CAT:
|
if not g.CAT:
|
||||||
targetDir = (args[3] if g.extractFile else args[2])
|
targetDir = (args[3] if g.extractFile else args[2])
|
||||||
unshkdir = (tempfile.gettempdir() + "/cppo-" + str(uuid.uuid4()))
|
unshkdir = ('/tmp' + "/cppo-" + str(uuid.uuid4()))
|
||||||
makedirs(unshkdir)
|
makedirs(unshkdir)
|
||||||
result = os.system("/bin/bash -c 'cd " + unshkdir + "; " +
|
result = os.system("/bin/bash -c 'cd " + unshkdir + "; " +
|
||||||
"result=$(nulib2 -xse " + os.path.abspath(g.imageFile) +
|
"result=$(nulib2 -xse " + os.path.abspath(g.imageFile) +
|
||||||
@@ -1202,7 +1218,7 @@ if g.SHK:
|
|||||||
extractPath = (unshkdir + "/" + g.extractFile)
|
extractPath = (unshkdir + "/" + g.extractFile)
|
||||||
extractPathDir = os.path.dirname(extractPath)
|
extractPathDir = os.path.dirname(extractPath)
|
||||||
# move the extracted file to the root
|
# move the extracted file to the root
|
||||||
newunshkdir = (tempfile.gettempdir() + "/cppo-" + str(uuid.uuid4()))
|
newunshkdir = ('/tmp' + "/cppo-" + str(uuid.uuid4()))
|
||||||
makedirs(newunshkdir)
|
makedirs(newunshkdir)
|
||||||
for filename in os.listdir(extractPathDir):
|
for filename in os.listdir(extractPathDir):
|
||||||
shutil.move(extractPathDir + "/" + filename, newunshkdir)
|
shutil.move(extractPathDir + "/" + filename, newunshkdir)
|
||||||
@@ -1268,7 +1284,7 @@ if g.SHK:
|
|||||||
quitNow(0)
|
quitNow(0)
|
||||||
|
|
||||||
# end script if SHK
|
# end script if SHK
|
||||||
|
|
||||||
g.imageData = loadFile(g.imageFile)
|
g.imageData = loadFile(g.imageFile)
|
||||||
|
|
||||||
# detect if image is 2mg and remove 64-byte header if so
|
# detect if image is 2mg and remove 64-byte header if so
|
||||||
@@ -1329,7 +1345,7 @@ if (len(g.imageData) == 143360):
|
|||||||
#print("saving fixed order file as outfile.dsk")
|
#print("saving fixed order file as outfile.dsk")
|
||||||
#saveFile("outfile.dsk", g.imageData)
|
#saveFile("outfile.dsk", g.imageData)
|
||||||
#print("saved")
|
#print("saved")
|
||||||
|
|
||||||
if not prodosDisk and not g.D33:
|
if not prodosDisk and not g.D33:
|
||||||
print("Warning: Unable to determine disk format, assuming ProDOS.")
|
print("Warning: Unable to determine disk format, assuming ProDOS.")
|
||||||
|
|
||||||
@@ -1341,22 +1357,6 @@ if (not g.SHK and
|
|||||||
(slyce(args[2],0,1) != ":")):
|
(slyce(args[2],0,1) != ":")):
|
||||||
usage()
|
usage()
|
||||||
|
|
||||||
if g.extractFile:
|
|
||||||
targetPath = args[3]
|
|
||||||
if os.path.isdir(targetPath):
|
|
||||||
g.targetDir = targetPath
|
|
||||||
else:
|
|
||||||
g.targetDir = targetPath.rsplit("/", 1)[0]
|
|
||||||
g.targetName = targetPath.rsplit("/", 1)[1]
|
|
||||||
if not os.path.isdir(g.targetDir):
|
|
||||||
print("Target directory not found.")
|
|
||||||
quitNow(2)
|
|
||||||
else:
|
|
||||||
if not g.CAT:
|
|
||||||
if not os.path.isdir(args[2]):
|
|
||||||
print("Target directory not found.")
|
|
||||||
quitNow(2)
|
|
||||||
|
|
||||||
if g.D33:
|
if g.D33:
|
||||||
diskName = os.path.basename(g.imageFile)
|
diskName = os.path.basename(g.imageFile)
|
||||||
if (diskName[-4:].lower() == ".dsk" or
|
if (diskName[-4:].lower() == ".dsk" or
|
||||||
|
|||||||
@@ -14,7 +14,7 @@ a2serverVersion="150"
|
|||||||
# 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
|
||||||
*/) scriptURL="$A2SERVER_SCRIPT_URL" ;;
|
*/) scriptURL="$A2SERVER_SCRIPT_URL" ;;
|
||||||
*) scriptURL="${A2SERVER_SCRIPT_URL:-https://rawgit.com/RasppleII/a2server/current}/" ;;
|
*) scriptURL="${A2SERVER_SCRIPT_URL:-https://raw.githubusercontent.com/RasppleII/a2server/current}/" ;;
|
||||||
esac
|
esac
|
||||||
case "$A2SERVER_BINARY_URL" in
|
case "$A2SERVER_BINARY_URL" in
|
||||||
*/) binaryURL="$A2SERVER_BINARY_URL" ;;
|
*/) binaryURL="$A2SERVER_BINARY_URL" ;;
|
||||||
@@ -27,15 +27,16 @@ isRpi=
|
|||||||
[[ -f /usr/bin/raspi-config ]] && isRpi=1
|
[[ -f /usr/bin/raspi-config ]] && isRpi=1
|
||||||
|
|
||||||
isDebian=
|
isDebian=
|
||||||
lsb_release -a 2> /dev/null | grep -q 'Distributor ID:.Debian' && [[ ( -f /etc/debian_version ) && ( $(cut -c 1 < /etc/debian_version) -ge "7" ) ]] && isDebian=1
|
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
|
||||||
|
|
||||||
if [[ -f /usr/local/etc/A2SERVER-version ]]; then
|
if [ -f /usr/local/etc/A2SERVER-version ]; then
|
||||||
echo "A2SERVER version available: $a2serverVersion"
|
installedVersion="$(cat /usr/local/etc/A2SERVER-version)"
|
||||||
echo "A2SERVER version installed: $(cat /usr/local/etc/A2SERVER-version)"
|
|
||||||
fi
|
fi
|
||||||
|
echo "A2SERVER version available: $a2serverVersion"
|
||||||
|
echo "A2SERVER version installed: ${installedVersion:=None}"
|
||||||
|
|
||||||
echo
|
echo
|
||||||
[[ $scriptURL != *"ivanx.com"* && $scriptURL != *"rawgit.com/RasppleII/a2server"* ]] && echo "Using script URL: $scriptURL"
|
[[ $scriptURL != *"ivanx.com"* && $scriptURL != *"raw.githubusercontent.com/RasppleII/a2server"* ]] && echo "Using script URL: $scriptURL"
|
||||||
[[ $binaryURL != *"ivanx.com"* ]] && echo "Using binary URL: $binaryURL"
|
[[ $binaryURL != *"ivanx.com"* ]] && echo "Using binary URL: $binaryURL"
|
||||||
[[ ! $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.)"
|
[[ ! $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.)"
|
||||||
|
|
||||||
@@ -77,10 +78,7 @@ while [[ $1 ]]; do
|
|||||||
updateRasppleII=1
|
updateRasppleII=1
|
||||||
elif [[ $1 == "-v" ]]; then
|
elif [[ $1 == "-v" ]]; then
|
||||||
shift
|
shift
|
||||||
if [[ ! -f /usr/local/etc/A2SERVER-version ]]; then
|
# Version was already printed
|
||||||
echo "A2SERVER version available: $a2serverVersion"
|
|
||||||
echo "A2SERVER version installed: none"
|
|
||||||
fi
|
|
||||||
[[ $0 == "-bash" ]] && return 1 || exit 1
|
[[ $0 == "-bash" ]] && return 1 || exit 1
|
||||||
elif [[ $1 ]]; then
|
elif [[ $1 ]]; then
|
||||||
echo "options:"
|
echo "options:"
|
||||||
@@ -281,10 +279,11 @@ if (( $doSetup )); then
|
|||||||
echo "Workstation Card software. For IIgs users, it should be accessible"
|
echo "Workstation Card software. For IIgs users, it should be accessible"
|
||||||
echo "via the AppleShare control panel."
|
echo "via the AppleShare control panel."
|
||||||
if [[ -f /srv/A2SERVER/A2FILES/System/Start.GS.OS ]]; then
|
if [[ -f /srv/A2SERVER/A2FILES/System/Start.GS.OS ]]; then
|
||||||
echo
|
echo
|
||||||
echo "You can network boot GS/OS. On a ROM 01 IIgs, set slot 1 or 2, and slot 7,"
|
echo "You can network boot GS/OS."
|
||||||
echo 'to AppleTalk, and Startup Slot to 7 or "Scan". On a ROM 3 IIgs, set'
|
echo "On a ROM 01 IIgs, set slot 1 (printer port), or slot 2 (modem port)"
|
||||||
echo "slot 1 or 2, and Startup Slot, to AppleTalk."
|
echo "to Your Card, and slot 7 to AppleTalk, and Startup Slot to 7 or Scan."
|
||||||
|
echo "On a ROM 3 IIgs, set slot 1 or 2, and Startup Slot, to AppleTalk."
|
||||||
fi
|
fi
|
||||||
if [[ -f /srv/A2SERVER/A2FILES/BASIC.System ]]; then
|
if [[ -f /srv/A2SERVER/A2FILES/BASIC.System ]]; then
|
||||||
echo
|
echo
|
||||||
@@ -328,7 +327,7 @@ if (( $doSetup )); then
|
|||||||
echo "by typing 'appletalk-on'."
|
echo "by typing 'appletalk-on'."
|
||||||
echo
|
echo
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -f /tmp/noMacIP ]]; then
|
if [[ -f /tmp/noMacIP ]]; then
|
||||||
echo
|
echo
|
||||||
echo "MacIP connections may be unavailable. If you know how, try"
|
echo "MacIP connections may be unavailable. If you know how, try"
|
||||||
|
|||||||
@@ -68,7 +68,7 @@
|
|||||||
|
|
||||||
1.2.6: Nov 2015: full, ready to use install of Spectrum; install unzip
|
1.2.6: Nov 2015: full, ready to use install of Spectrum; install unzip
|
||||||
[unannounced]
|
[unannounced]
|
||||||
|
|
||||||
1.2.6+:Nov 2015: merged Ivan's 1.2.6 (into github master branch)
|
1.2.6+:Nov 2015: merged Ivan's 1.2.6 (into github master branch)
|
||||||
[unannounced]
|
[unannounced]
|
||||||
|
|
||||||
@@ -80,11 +80,11 @@
|
|||||||
1.2.8: Dec 2015: can specify alternate host for binaries and external files;
|
1.2.8: Dec 2015: can specify alternate host for binaries and external files;
|
||||||
[unannounced] 64-bit Debian precompiled binaries; move /media/A2SHARED/*
|
[unannounced] 64-bit Debian precompiled binaries; move /media/A2SHARED/*
|
||||||
to /srv/A2SERVER; internet access (MacIP support);
|
to /srv/A2SERVER; internet access (MacIP support);
|
||||||
|
|
||||||
1.2.9: Jan 2016: cppo supports ShrinkIt, DOS 3.3, DSK, 2MG; MountIt fully
|
1.2.9: Jan 2016: cppo supports ShrinkIt, DOS 3.3, DSK, 2MG; MountIt fully
|
||||||
[unannounced] installed; nulib2 fixes handling empty forks (thanks Andy);
|
[unannounced] installed; nulib2 fixes handling empty forks (thanks Andy);
|
||||||
-c installer option compiles all software (no binaries)
|
-c installer option compiles all software (no binaries)
|
||||||
|
|
||||||
1.3.0: Jan 2016: Marinetti 3.0b8 installed, with preconfigured MacIP
|
1.3.0: Jan 2016: Marinetti 3.0b8 installed, with preconfigured MacIP
|
||||||
[unannounced]
|
[unannounced]
|
||||||
|
|
||||||
@@ -93,5 +93,9 @@
|
|||||||
|
|
||||||
1.3.2: Jan 2016: install SAFE2, SAM2, and SNAP, configured for Apple II sites;
|
1.3.2: Jan 2016: install SAFE2, SAM2, and SNAP, configured for Apple II sites;
|
||||||
[unannounced] -i installer option reinstalls A2SERVER
|
[unannounced] -i installer option reinstalls A2SERVER
|
||||||
|
|
||||||
1.5.0: Jan 2016: defaults to GitHub for location of installer scripts
|
1.5.0: Jan 2016: defaults to GitHub for location of installer scripts
|
||||||
|
[unannounced]
|
||||||
|
|
||||||
|
1.5.1: May 2016: changed URLs from rawgit.com to raw.githubusercontent.com
|
||||||
|
to resolve https problems during install
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
# 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
|
||||||
*/) scriptURL="$A2SERVER_SCRIPT_URL" ;;
|
*/) scriptURL="$A2SERVER_SCRIPT_URL" ;;
|
||||||
*) scriptURL="${A2SERVER_SCRIPT_URL:-https://rawgit.com/RasppleII/a2server/current}/" ;;
|
*) scriptURL="${A2SERVER_SCRIPT_URL:-https://raw.githubusercontent.com/RasppleII/a2server/current}/" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
currentVersion=$(wget -qO- "${scriptURL}setup/index.txt" | grep '^a2serverVersion' | cut -d '"' -f 2)
|
currentVersion=$(wget -qO- "${scriptURL}setup/index.txt" | grep '^a2serverVersion' | cut -d '"' -f 2)
|
||||||
|
|||||||
@@ -56,7 +56,7 @@
|
|||||||
1.2.6: Nov 2015: full, ready to use install of Spectrum
|
1.2.6: Nov 2015: full, ready to use install of Spectrum
|
||||||
[unannounced; released briefly, then withdrawn]
|
[unannounced; released briefly, then withdrawn]
|
||||||
|
|
||||||
1.5.0: Jan 2016: mixed case filenames for A2FILES; remove GSFILES if empty;
|
1.5.0: Jan 2016: mixed case filenames for A2FILES; remove GSFILES if empty;
|
||||||
install Marinetti 3.0b8 with internet access via MacIP;
|
install Marinetti 3.0b8 with internet access via MacIP;
|
||||||
fully install Spectrum, SAFE2, SAM2, SNAP, MountIt; install
|
fully install Spectrum, SAFE2, SAM2, SNAP, MountIt; install
|
||||||
DOS3.3 and TEACH; remove Ubuntu support; move/media/A2SHARED/*
|
DOS3.3 and TEACH; remove Ubuntu support; move/media/A2SHARED/*
|
||||||
@@ -67,6 +67,9 @@
|
|||||||
for current date; install from any host URL for development;
|
for current date; install from any host URL for development;
|
||||||
source code at GitHub (thanks Joseph)
|
source code at GitHub (thanks Joseph)
|
||||||
|
|
||||||
|
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,
|
Big thanks to: Anthony Martino, Henry Courbis, Joseph Carter, Jason King,
|
||||||
Andy McFadden, Steven Hirsch, Geoff Body, Peter Wong, Tony Diaz, David Schmidt,
|
Andy McFadden, Steven Hirsch, Geoff Body, Peter Wong, Tony Diaz, David Schmidt,
|
||||||
David Schmenk, Ewen Wannop, Andrew Roughan, Antoine Vignau, Martin Haye,
|
David Schmenk, Ewen Wannop, Andrew Roughan, Antoine Vignau, Martin Haye,
|
||||||
|
|||||||
Reference in New Issue
Block a user