setup.txt: comments from jessie branch

This commit is contained in:
T. Joseph Carter 2016-04-10 05:36:34 -07:00
parent dc6745bb21
commit e3f7ca02b5

View File

@ -62,6 +62,7 @@ fi
echo "A2CLOUD version available: $version"
echo "A2CLOUD version installed: ${installedVersion:-None}"
### A2CLOUD: Process command line args
buildA2CloudDisk=
downloadBinaries=1
skipRepoUpdate=
@ -115,6 +116,7 @@ while [[ $1 ]]; do
fi
done
### RaspbianUpdate
if [[ $updateRasppleII ]]; then
echo "A2CLOUD: Updating Raspple II (takes up to an hour)..."
wget -qO /tmp/raspbian-update ${scriptURL}setup/raspbian-update.txt
@ -148,6 +150,7 @@ fi
echo
installAllFeatures=
if [[ ! $autoAnswerYes ]]; then
### Q: Install all features?
echo
echo -n "Do you want to install all A2CLOUD features? "
read
@ -162,6 +165,7 @@ if [[ $installAllFeatures ]]; then
installArchiveTools=1
installEmulators=1
else
### Q: Install ADTPro?
installADTPro=
echo
echo -n "Install ADTPro server, for virtual drives and floppy disk transfers"
@ -173,6 +177,7 @@ else
read
[[ ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]] && installADTPro=1
### Q: Create disk images?
createBootDisk=
installArchiveTools=
newImageName=
@ -222,18 +227,21 @@ else
fi
fi
### Q: Install serial port login?
setupSerialPortLogin=
echo
echo -n "Do you want to set up your $me for serial port login? "
read
[[ ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]] && setupSerialPortLogin=1
### Q: Install Comm Tools?
installCommTools=
echo
echo -n "Install internet access and file transfer tools on your $me? "
read
[[ ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]] && installCommTools=1
### Q: Install archive tools?
if [[ ! $installArchiveTools ]]; then
echo
echo -n "Install utilities for Apple II archives and disk images? "
@ -241,6 +249,7 @@ else
[[ ${REPLY:0:1} == "Y" || ${REPLY:0:1} == "y" ]] && installArchiveTools=1
fi
### Q: Install emulators?
installEmulators=
echo
echo -n "Install Apple IIgs and IIe emulators? "
@ -288,6 +297,7 @@ rm -rf /tmp/a2cloud-install &>/dev/null
mkdir -p /tmp/a2cloud-install
cd /tmp/a2cloud-install
### A2CLOUD: Update apt package lists
echo
if [[ ! $skipRepoUpdate ]]; then
echo "A2CLOUD: Updating package lists..."
@ -299,9 +309,11 @@ fi
# general commands and configuration
### A2CLOUD: Install udev trigger
echo "A2CLOUD: Adding udev trigger to /etc/rc.local..."
grep udevadm /etc/rc.local >/dev/null || sudo sed -i 's/^exit 0$/[ -e \/dev\/ttyUSBupper ] \&\& ! [ -f \/tmp\/udev-ttyUSBupper-added ] \&\& udevadm trigger --action=change\n[ -e \/dev\/ttyUSBlower ] \&\& ! [ -f \/tmp\/udev-ttyUSBlower-added ] \&\& udevadm trigger --action=change\n\nexit 0/' /etc/rc.local
### A2CLOUD: Install cppo/dopo
echo "A2CLOUD: Setting up dopo command..."
sudo wget -qO /usr/local/bin/dopo ${scriptURL}setup/dopo.txt
sudo chmod ugo+x /usr/local/bin/dopo
@ -310,12 +322,14 @@ echo "A2CLOUD: Setting up cppo command..."
sudo wget -qO /usr/local/bin/cppo ${scriptURL}setup/cppo.txt
sudo chmod ugo+x /usr/local/bin/cppo
### A2CLOUD: Install help
echo "A2CLOUD: Setting up a2cloud-help..."
sudo wget -qO /usr/local/etc/a2cloud-help.txt ${scriptURL}setup/a2cloud-help.txt
if [[ $isRpi ]]; then
sudo sed -i 's/^gsport.*$/gsport : GSport Apple IIgs emulator (or log in with user "apple2user")/' /usr/local/etc/a2cloud-help.txt
fi
### A2CLOUD: Install MOTD
# FIXME: We have "three" MOTD files in the A2CLOUD tree but we only use
# one. The other two come from the Raspple II tree. We should clean
# this up at some point.
@ -330,6 +344,7 @@ else
fi
if lspci 2>/dev/null | grep -q VirtualBox; then
### A2CLOUD: Disable screen blanking on vbox
echo "A2CLOUD: Disabling VirtualBox console screen blanking..."
sudo sed -i 's/^BLANK_DPMS=off/BLANK_DPMS=on/' /etc/kbd/config
sudo sed -i 's/^BLANK_TIME=[^0].$/BLANK_TIME=0/' /etc/kbd/config
@ -337,6 +352,7 @@ if lspci 2>/dev/null | grep -q VirtualBox; then
sudo /etc/init.d/console-setup restart &>/dev/null
fi
### A2CLOUD: Install aliases and make bash use them by default
echo "A2CLOUD: Setting up control commands and environment variables..."
sudo wget -qO /usr/local/etc/a2cloud-aliases ${scriptURL}setup/a2cloud-aliases.txt
echo "A2CLOUD: Setting up login script..."
@ -346,9 +362,11 @@ sudo sed -i '/ttyUSB/d' /etc/bash.bashrc
sudo wget -qO /usr/local/etc/a2cloudrc ${scriptURL}setup/a2cloudrc.txt
source /usr/local/etc/a2cloudrc
### A2CLOUD: Record the version we're installing
echo "A2CLOUD: Saving installer version..."
echo "$version" | sudo tee /usr/local/etc/A2CLOUD-version &>/dev/null
### A2CLOUD: Install avahi (Bonjour)
if ! dpkg-query -l avahi-daemon &>/dev/null || ! dpkg-query -l libnss-mdns &>/dev/null; then
echo "A2CLOUD: Installing avahi-daemon (mDNS)..."
sudo apt-get -y install avahi-daemon &>/dev/null
@ -360,6 +378,7 @@ fi
if [[ $installADTPro ]]; then
### ADTPro: Make sure we have enough free space
freeSpace=$(df / | tail -1 | awk '{ print $4 }')
java -version &>/dev/null
if (( $? == 127 && $freeSpace < 350000 )); then
@ -377,18 +396,21 @@ if [[ $installADTPro ]]; then
[[ $0 == "-bash" ]] && return 3 || exit 3
fi
### ADTPro: Install X and LXDE
### Well, you need _something_ for ADTPro, and LXDE is as good as anything
### FIXME: Very PC-centric and this code might get run on minimal Raspbian
if ! hash X 2>/dev/null; then
echo "A2CLOUD: Installing X Window System and LXDE..."
sudo apt-get -y install xorg lxde
sudo apt-get -y clean
# prevent automatically running at startup
# FIXME: JESSIE/RPI: Not how this is done for systemd/RPi/etc
sudo sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT=.*$/GRUB_CMDLINE_LINUX_DEFAULT="text"/' /etc/default/grub
sudo update-grub
else
echo "A2CLOUD: X Window System and LXDE are already installed."
fi
### A2CLOUD: Setup VirtualBox resolution
if lspci 2>/dev/null | grep -q VirtualBox; then
if ! grep -q default /etc/xdg/lxsession/LXDE/autostart; then
echo "A2CLOUD: Setting desktop to 800x600 in VirtualBox console (no Additions)..."
@ -405,6 +427,7 @@ if [[ $installADTPro ]]; then
echo "A2CLOUD: Disabling screensaver and screen blanking in VirtualBox LXDE..."
sudo sed -i 's/^\(@xscreensaver.*\)$/#\1\n\nxset s noblank\nxset s off\nxset -dpms\n/' /etc/xdg/lxsession/LXDE/autostart
fi
### A2CLOUD: Clean up after old version on RPi
if [[ $isRpi ]]; then
sudo sed -i 's/^.*VBOX0.*$//' /etc/xdg/lxsession/LXDE/autostart 2>/dev/null
sudo sed -i 's/^.*VBOX0.*$//' /etc/xdg/lxsession/LXDE-pi/autostart 2>/dev/null
@ -477,6 +500,7 @@ if [[ $installADTPro ]]; then
fi
fi
### ADTPro: Install ADTPro
if [[ ! -f /usr/local/adtpro/adtpro.sh || ! -f /usr/local/adtpro/ADTPro.html ]]; then
echo "A2CLOUD: installing ADTPro server..."
sudo pkill -f ADTPro
@ -494,6 +518,7 @@ if [[ $installADTPro ]]; then
echo "A2CLOUD: ADTPro server is already installed."
fi
### ADTPro: Install AppleCommander
if [[ ! -f /usr/local/adtpro/lib/AppleCommander/AppleCommander-1.3.5.13id-ac.jar ]]; then
echo "A2CLOUD: Installing AppleCommander-1.3.5.13id..."
sudo mkdir -p /usr/local/adtpro/lib/AppleCommander
@ -504,16 +529,20 @@ if [[ $installADTPro ]]; then
echo "A2CLOUD: AppleCommander-1.3.5.13id is already installed."
fi
### ADTPro: Install our modified adtpro.sh
echo "A2CLOUD: Setting up customized adtpro.sh..."
wget -qO /usr/local/adtpro/adtpro.sh "${scriptURL}setup/adtpro.sh.txt"
sudo chmod ugo+rwx /usr/local/adtpro/adtpro.sh
### ADTPro: Replace A2CLOUD's disks with the ones ...
### FIXME: where are these created/downloaded to move?
if [[ $updateADTPro ]]; then
echo "A2CLOUD: Replacing disks folder..."
sudo mv /tmp/a2cloud-install/disks/* /usr/local/adtpro/disks
sudo rmdir /tmp/a2cloud-install/disks
fi
### ADTPro: Install rxtx
if [[ ! -f /usr/lib/jni/librxtxSerial.so ]]; then
echo "A2CLOUD: Installing serial port libraries..."
sudo apt-get -y install librxtx-java
@ -532,6 +561,8 @@ if [[ $installADTPro ]]; then
echo "A2CLOUD: xvfb is already installed."
fi
### A2CLOUD: Enable netatalk sharing for A2CLOUD if it's installed
### FIXME: This has changed in A2SERVER, fix it here
if hash afpd 2>/dev/null; then # A2SERVER/netatalk installed
if [[ ! -d /srv/A2SERVER/ADTDISKS || ! $(grep ADTDISKS /usr/local/etc/netatalk/AppleVolumes.default) ]]; then
echo "A2CLOUD: Setting up /usr/local/adtpro/disks for Apple file sharing..."
@ -546,6 +577,7 @@ if [[ $installADTPro ]]; then
echo "A2CLOUD: /usr/local/adtpro/disks is already set up for Apple file sharing."
fi
### A2CLOUD: Enable samba sharing for A2CLOUD, if A2SERVER installed it
if grep -q A2SHARED /etc/samba/smb.conf 2>/dev/null; then
# SMB already enabled by A2SERVER
if grep -q ADTDISKS /etc/samba/smb.conf 2>/dev/null; then
@ -565,6 +597,7 @@ if [[ $installADTPro ]]; then
fi
fi
### A2CLOUD: Install various shell scripts
echo "A2CLOUD: Setting up adtpro-start command..."
sudo wget -qO /usr/local/bin/adtpro-start ${scriptURL}setup/adtpro-start.txt
sudo chmod ugo+x /usr/local/bin/adtpro-start
@ -587,6 +620,7 @@ if [[ $installADTPro ]]; then
fi
### ADTPro: Install xrdp
if hash X 2>/dev/null; then
if dpkg-query -l xrdp; then
echo "A2CLOUD: Installing xrdp/tightvncserver..."
@ -601,6 +635,7 @@ fi
if [[ $setupSerialPortLogin ]]; then
### SerialCon: Begin setting up serial console
echo "A2CLOUD: Setting GPIO serial login to 4800 bps, and disabling..."
# set console port login to 4800 bps (using RPi console cable) and comment it out
sudo sed -i 's/^\(T.*\)ttyAMA0 .* /#\1ttyAMA0 4800 /' /etc/inittab
@ -616,6 +651,8 @@ if [[ $setupSerialPortLogin ]]; then
echo "A2CLOUD: Disabling Screen welcome message..."
sudo sed -i 's/^#startup_message/startup_message/' /etc/screenrc
### SerialCon: Set up a single byte character set locale
### TODO: Figure out how to make this ASCII or CP437.
# use 8-bit (non-Unicode) character set for proper emulation in Apple II term programs
IFS='' defaultLang=$(grep ^LANG= /etc/default/locale | cut -f 2 -d '=')
langLatin1=${defaultLang%%.*}
@ -641,6 +678,7 @@ if [[ $setupSerialPortLogin ]]; then
echo "A2CLOUD: Serial port login is already using 8-bit character set."
fi
### SerialCon: Install serial login command scripts
echo "A2CLOUD: Setting up baud command..."
sudo wget -qO /usr/local/bin/baud ${scriptURL}setup/baud.txt
sudo chmod ugo+x /usr/local/bin/baud
@ -653,6 +691,7 @@ if [[ $setupSerialPortLogin ]]; then
sudo wget -qO /usr/local/sbin/usbgetty ${scriptURL}setup/usbgetty.txt
sudo chmod ugo+x /usr/local/sbin/usbgetty
### SerialCon: Install inittab serial port login
echo "A2CLOUD: Removing ttyUSB0 shell login..."
sudo sed -i "s/^\([^#].*ttyUSB0.*\)$//" /etc/inittab
@ -667,6 +706,7 @@ if [[ $setupSerialPortLogin ]]; then
fi
### A2CLOUD: Install serial port rules/scripts
echo "A2CLOUD: Setting up USB port serial adapter handler..."
sudo wget -qO /usr/local/sbin/ttyusbhandler ${scriptURL}setup/ttyusbhandler.txt
sudo chmod ugo+x /usr/local/sbin/ttyusbhandler
@ -708,6 +748,7 @@ fi
if [[ $installCommTools ]]; then
if ! hash curl 2>/dev/null; then
### CommTools: Install curl
echo "A2CLOUD: Installing curl..."
sudo apt-get -y install curl
sudo apt-get -y clean
@ -716,6 +757,7 @@ if [[ $installCommTools ]]; then
fi
if ! hash sz 2>/dev/null; then
### CommTools: Install lrzsz
echo "A2CLOUD: Installing rzsz for X/Y/Zmodem transfers..."
sudo apt-get -y install lrzsz
sudo apt-get -y clean
@ -724,6 +766,7 @@ if [[ $installCommTools ]]; then
fi
if ! hash ftp 2>/dev/null; then
### CommTools: Install ftp
echo "A2CLOUD: Installing ftp..."
sudo apt-get -y install ftp
sudo apt-get -y clean
@ -732,6 +775,7 @@ if [[ $installCommTools ]]; then
fi
if ! hash cftp 2>/dev/null; then
### CommTools: Install cftp
echo "A2CLOUD: Installing cftp..."
cd /tmp/a2cloud-install
if [[ $downloadBinaries ]]; then
@ -758,6 +802,7 @@ if [[ $installCommTools ]]; then
fi
if ! hash lynx 2>/dev/null; then
### CommTools: Install lynx
echo "A2CLOUD: Installing lynx..."
sudo apt-get -y install lynx
sudo apt-get -y clean
@ -766,6 +811,7 @@ if [[ $installCommTools ]]; then
fi
if ! hash links 2>/dev/null; then
### CommTools: Install links
echo "A2CLOUD: Installing links..."
sudo apt-get -y --force-yes install links
sudo apt-get -y clean
@ -773,6 +819,7 @@ if [[ $installCommTools ]]; then
echo "A2CLOUD: links is already installed."
fi
### CommTools: Install tin + a2news script
sudo wget -qO /usr/local/bin/a2news ${scriptURL}setup/a2news.txt
sudo chmod ugo+x /usr/local/bin/a2news
if ! hash tin 2>/dev/null; then
@ -782,6 +829,7 @@ if [[ $installCommTools ]]; then
else
echo "A2CLOUD: a2news/tin is already installed."
fi
### CommTools: Configure exim4 to use ipv4 to kill console errors
# have exim4 use IPv4 only to prevent log errors (IPv6 is off by default in Raspbian)
if [[ $(grep ' ; ::1' /etc/exim4/update-exim4.conf.conf) ]]; then
echo "A2CLOUD: Setting exim4 to use only IPv4 to prevent startup error messages..."
@ -798,6 +846,7 @@ if [[ $installCommTools ]]; then
sudo chmod 2750 /var/log/exim4
fi
### CommTools: Install irssi + a2chat script
sudo wget -qO /usr/local/bin/a2chat ${scriptURL}setup/a2chat.txt
sudo chmod ugo+x /usr/local/bin/a2chat
if ! hash irssi 2>/dev/null; then
@ -808,6 +857,7 @@ if [[ $installCommTools ]]; then
echo "A2CLOUD: a2chat/irssi is already installed."
fi
### CommTools: Install telnet
if ! hash telnet 2>/dev/null; then
echo "A2CLOUD: Installing telnet..."
sudo apt-get -y install telnet
@ -816,6 +866,7 @@ if [[ $installCommTools ]]; then
echo "A2CLOUD: telnet is already installed."
fi
### CommTools: Install TTYtter
# Do we need to check for the readline module here as well?
#if [[ ( ! -f /usr/bin/ttytter && ! -f /usr/local/bin/ttytter ) || ! -f "/usr/local/share/perl/5.14.2/Term/ReadLine/TTYtter.pm" ]]; then
if ! hash ttyter 2>/dev/null; then
@ -1004,9 +1055,12 @@ if [[ $installArchiveTools ]]; then
cd /tmp/a2cloud-install
if [[ $downloadBinaries ]]; then
### ArchiveTools: Install nulib2 binaries
wget -qO- "${binaryURL}precompiled/nulib2-${arch}_${debianName}.tgz" | sudo tar Pzx
fi
if ! hash nulib2 2>/dev/null; then
### ArchiveTools: Install nulib2 from source
sudo apt-get -y install build-essential
sudo apt-get -y install zlib1g-dev
sudo apt-get -y clean
@ -1033,7 +1087,7 @@ if [[ $installArchiveTools ]]; then
fi
if ! hash sciibin 2>/dev/null; then
### ArchiveTools: Install undoit (sciibin, etc.)
echo "A2CLOUD: Installing sciibin, unblu, unbit, unexec, usq..."
sudo apt-get -y install build-essential
@ -1052,13 +1106,14 @@ if [[ $installArchiveTools ]]; then
fi
echo "A2CLOUD: Setting up shk2image command..."
### ArchiveTools: Install shk2image command
sudo wget -qO /usr/local/bin/shk2image ${scriptURL}setup/shk2image.txt
sudo chmod ugo+x /usr/local/bin/shk2image
# download and install The Unarchiver, for expanding apple.com disk images
# http://wakaba.c3.cx/s/apps/unarchiver.html
if ! hash unar 2>/dev/null; then
### ArchiveTools: Install unar package
echo "A2CLOUD: Installing The Unarchiver..."
# jessie and later: Just use the unar package
@ -1109,8 +1164,9 @@ if [[ $installArchiveTools ]]; then
fi
fi
# add shortcuts to LXDE desktop and menu
if hash X 2>/dev/null; then
### A2CLOUD: Add XDG desktop files
[[ -d /etc/xdg/lxsession/LXDE-pi ]] && lxde="lxde-pi" || lxde="lxde"
echo "A2CLOUD: Creating LXDE desktop and menu shortcuts..."
@ -1162,7 +1218,7 @@ if hash X 2>/dev/null; then
fi
# create A2CLOUD disk
### DiskImage: Make/update A2CLOUD disks
if [[ $updateADTPro || $createBootDisk ]] && hash acmd 2>/dev/null; then
a2CloudDisk=/usr/local/adtpro/disks/A2CLOUD.PO
@ -1184,10 +1240,12 @@ if [[ $a2CloudDisk ]]; then
makeA2CloudDisk=
fi
if [[ ! $makeA2CloudDisk ]]; then # not getting/building disks
if [[ ! $makeA2CloudDisk ]]; then
### DiskImage: Use existing A2CLOUD disks
a2CloudDiskUpdated=
if [[ $updateADTPro && -f "$a2CloudDisk" ]]; then # does existing 800K disk need updating?
if [[ $updateADTPro && -f "$a2CloudDisk" ]]; then
### DiskImage: Update ADTPro on 800k image
sudo pkill -f ADTPro
echo "A2CLOUD: Updating ADTPro and VDrive on 800K A2CLOUD disk..."
acmd -g /usr/local/adtpro/disks/VDRIVE-*DSK VEDRIVE - | acmd -p "$a2CloudDisk" VEDRIVE SYS
@ -1202,7 +1260,8 @@ if [[ $a2CloudDisk ]]; then
acmd -g /usr/local/adtpro/disks/VDRIVE-*DSK VSDRIVE.LOW - | acmd -p "$a2CloudDisk" VSDRIVE.LOW SYS
a2CloudDiskUpdated=1
fi
if [[ $updateADTPro && -f "$a2CloudDisk140" ]]; then # does existing 140K disk need updating?
if [[ $updateADTPro && -f "$a2CloudDisk140" ]]; then
### DiskImage: Update ADTPro on 140k image
sudo pkill -f ADTPro
echo "A2CLOUD: Updating ADTPro and VDrive on 140K A2CLOUD disk..."
acmd -g /usr/local/adtpro/disks/ADTPRO-*DSK ADTPRO.BIN - | acmd -p "$a2CloudDisk140" ADTPRO.BIN BIN \$0800
@ -1217,7 +1276,8 @@ if [[ $a2CloudDisk ]]; then
echo " to update your boot floppy with their current contents using ADTPro."
fi
echo
else # building or downloading disks
else
### DiskImage: Building images from scratch
sudo pkill -f ADTPro
if [[ ! $buildA2CloudDisk ]]; then
echo "A2CLOUD: Downloading 800K disk image..."
@ -1235,7 +1295,7 @@ if [[ $a2CloudDisk ]]; then
cp /usr/local/adtpro/disks/ADTPRO-*PO $a2CloudDisk
acmd -n $a2CloudDisk A2CLOUD
# ADTPro
### DiskImage: Begin by modifying ADTPro image
echo "A2CLOUD: Preparing ADTPro..."
acmd -d "$a2CloudDisk" BASIC
@ -1256,7 +1316,7 @@ if [[ $a2CloudDisk ]]; then
# use our startup program
wget -qO- "${binaryURL}STARTUP.BAS" | acmd -p "$a2CloudDisk" STARTUP BAS
# VEDRIVE
### DiskImage: Add VEDRIVE to A2CLOULD disk
echo "A2CLOUD: Copying VEDRIVE..."
acmd -g /usr/local/adtpro/disks/VDRIVE-*DSK VEDRIVE - | acmd -p "$a2CloudDisk" VEDRIVE SYS
acmd -g /usr/local/adtpro/disks/VDRIVE-*DSK VEDRIVE.CONFIG - | acmd -p "$a2CloudDisk" VEDRIVE.CONFIG BAS
@ -1264,7 +1324,7 @@ if [[ $a2CloudDisk ]]; then
sysutilsURL="http://download.info.apple.com/Apple_Support_Area/Apple_Software_Updates/English-North_American/Apple_II/Apple_II_Supplemental/"
sysutilsBackupURL="http://archive.org/download/download.info.apple.com.2012.11/download.info.apple.com.2012.11.zip/download.info.apple.com%2FApple_Support_Area%2FApple_Software_Updates%2FEnglish-North_American%2FApple_II%2FApple_II_Supplemental%2F"
# Apple System Utilities 3.1 support files
### DiskImage: Add Apple System Utilities 3.1 support files to A2CLOULD disk
if hash unar 2>/dev/null; then
echo "A2CLOUD: Downloading and copying System Utilities support files..."
cd /tmp/a2cloud-install
@ -1281,7 +1341,7 @@ if [[ $a2CloudDisk ]]; then
echo "A2CLOUD: unar is not available; not installing System Utilities support files."
fi
# ProTERM
### DiskImage: Add ProTERM 3.1 to A2CLOULD disk
echo "A2CLOUD: Downloading ProTERM..."
wget --user-agent="Mozilla/5.0 (wget_A2CLOUD; rv:1.13.4) Gecko/20100101 Firefox/4.0.1" -qO /tmp/a2cloud-install/pt31.shk http://lostclassics.apple2.info/download/InTrec/PT31A2GM2K9.SHK
mkdir -p /tmp/a2cloud-install/pt31
@ -1311,13 +1371,13 @@ if [[ $a2CloudDisk ]]; then
cd /tmp/a2cloud-install
rm -rf /tmp/a2cloud-install/pt31
# Z-Link
### DiskImage: Add Z-Link to A2CLOULD disk
echo "A2CLOUD: Downloading and copying Z-Link..."
cd /tmp/a2cloud-install
wget -qO /tmp/a2cloud-install/zlink.shk "ftp://ftp.gno.org/pub/apple2/prodos/comm/term/zLink91.shk"
nulib2 -p zlink.shk z.link.system | acmd -p "$a2CloudDisk" Z.LINK SYS
# ShrinkIt
### DiskImage: Add ShrinkIt to A2CLOULD disk
echo "A2CLOUD: Downloading and copying ShrinkIt..."
cd /tmp/a2cloud-install
wget -qO shrinkit.sdk http://web.archive.org/web/20131031160750/http://www.nulib.com/library/shrinkit.sdk
@ -1328,13 +1388,15 @@ if [[ $a2CloudDisk ]]; then
acmd -g /tmp/a2cloud-install/SHRINKIT IIPLUS.SHRINKIT - | acmd -p "$a2CloudDisk" IIPLUS.SHRINKIT SYS
acmd -g /tmp/a2cloud-install/SHRINKIT IIPLUS.UNSHRINK - | acmd -p "$a2CloudDisk" IIPLUS.UNSHRINK SYS
# DSK2FILE
### DiskImage: Add DSK2FILE to A2CLOULD disk
echo "A2CLOUD: Downloading and copying DSK2FILE..."
cd /tmp/a2cloud-install
wget -q -O dsk2file.shk http://www.dwheeler.com/6502/oneelkruns/dsk2file.zip
nulib2 -p dsk2file.shk dsk2file58 | acmd -p "$a2CloudDisk" DSK2FILE SYS
# Apple System Utilities 3.1 launch file
### DiskImage: Add Apple System Utilities 3.1 to A2CLOULD disk
### Required unar to unpack above (see ## ArchiveTools: Install unar package)
### Apple_II_System_Disk_3.2.sea.bin
if hash unar 2>/dev/null; then
echo "A2CLOUD: Copying System Utilities launch file..."
acmd -g A2SYSDISK32.PO SYSUTIL.SYSTEM - | acmd -p "$a2CloudDisk" SYSUTIL SYS
@ -1342,18 +1404,18 @@ if [[ $a2CloudDisk ]]; then
echo "A2CLOUD: unar is not available; not installing System Utilities."
fi
# Filer
### DiskImage: Add Filer to A2CLOULD disk
echo "A2CLOUD: Downloading and copying Filer..."
wget -qO /tmp/a2cloud-install/mmgr.prutil.sdk ftp://ftp.gno.org/pub/apple2/prodos/comm/term/modem.mgr/mmgr.prutil.sdk
cd /tmp/a2cloud-install
nulib2 -xs mmgr.prutil.sdk >/dev/null
acmd -g /tmp/a2cloud-install/MMGR FILER - | acmd -p "$a2CloudDisk" FILER SYS
# ADTPRO launch
### DiskImage: Add ADTPro client to A2CLOULD disk
echo "A2CLOUD: Copying ADTPro launch file..."
acmd -g /usr/local/adtpro/disks/ADTPRO-*DSK ADTPRO - | acmd -p "$a2CloudDisk" ADTPRO SYS
# VSDRIVE
### DiskImage: Add VSDRIVE to A2CLOULD disk
if [[ ! $(acmd -ls "$a2CloudDisk" | grep '^VSDRIVE BIN') ]]; then
echo "A2CLOUD: Copying VSDRIVE..."
acmd -g /usr/local/adtpro/disks/VDRIVE-*DSK VSDRIVE - | acmd -p "$a2CloudDisk" VSDRIVE SYS
@ -1366,6 +1428,7 @@ if [[ $a2CloudDisk ]]; then
if [[ ! -f $a2CloudDisk140 || ( $(wc -c $a2CloudDisk140 | cut -f 1 -d ' ') != "143360" ) ]]; then
### DiskImage: Create 140k disk image
echo "A2CLOUD: Creating 140K disk image..."
mkpo "$a2CloudDisk140" A2CLOUD
dd bs=256 count=1 of="$a2CloudDisk140" conv=notrunc 2>/dev/null < /usr/local/adtpro/disks/ADTPRO-*DSK
@ -1386,18 +1449,26 @@ if [[ $a2CloudDisk ]]; then
fi
if [[ -f /usr/local/adtpro/disks/Virtual.po && ! -L /usr/local/adtpro/disks/Virtual.po ]]; then
### DiskImage: Virtual.po exists and is not a symlink
### Move it and link it back into place
mv /usr/local/adtpro/disks/Virtual.po /usr/local/adtpro/disks/defaultVirtual.po &>/dev/null
vsd1 -f /usr/local/adtpro/disks/defaultVirtual.po
fi
if [[ -f /usr/local/adtpro/disks/Virtual2.po && ! -L /usr/local/adtpro/disks/Virtual2.po ]]; then
### DiskImage: Virtual2.po exists and is not a symlink
if [[ $(sha1sum /usr/local/adtpro/disks/Virtual2.po | cut -d ' ' -f 1) == "41c178f9f596f94ea7607624672552137dccade2" ]]; then
### DiskImage: We recognize it, just delete
rm /usr/local/adtpro/disks/Virtual2.po
else
### DiskImage: We do NOT recognize this Virtual2.po file
### ...just move it out of the way
mv /usr/local/adtpro/disks/Virtual2.po /usr/local/adtpro/disks/defaultVirtual2.po &>/dev/null
fi
fi
vsd2 -f $a2CloudDisk
### DiskImage: Create pre 1.6.7 A2CLOUD.HDV compatibility symlink
### Do we still need this?
# for compatibility with pre-1.6.7
ln -s /usr/local/adtpro/disks/A2CLOUD.PO /usr/local/adtpro/disks/A2CLOUD.HDV
@ -1415,10 +1486,9 @@ if [[ $a2CloudDisk ]]; then
fi
# make new blank disk of specified size
if [[ $newImageName ]]; then
### DiskImage: This is where the new Virtual.po gets made (search newImageName)
# make new blank disk of specified size
echo "A2CLOUD: Creating new ${imageSize}K image for virtual drive 1 at"
echo " /usr/local/adtpro/disks/$newImageName..."
sudo pkill -f ADTPro
@ -1427,10 +1497,15 @@ if [[ $newImageName ]]; then
vsd1 -f /usr/local/adtpro/disks/"$newImageName"
fi
### A2CLOUD: Setup the a2cloud-setup command
echo 'wget -q -O /tmp/a2cloud-setup ${A2CLOUD_SCRIPT_URL:-https://rawgit.com/RasppleII/a2cloud/current/}setup/setup.txt || { echo "Can'"'"'t download A2CLOUD setup scripts. Do you has internet?"; false; } && source /tmp/a2cloud-setup' | sudo tee /usr/local/bin/a2cloud-setup >/dev/null
sudo chmod ugo+x /usr/local/bin/a2cloud-setup
if [[ ! $restartPrompt ]]; then
### A2CLOUD: Start ADTPro
### If we're not going to just reboot the system, ADTPro
### should not be running yet. We'll start it here.
adtpro-start 2>/dev/null #start ADTPro if not running and USB adapter attached
fi
@ -1438,9 +1513,11 @@ echo
echo "A2CLOUD is now ready!"
echo "See http://ivanx.com/a2cloud for instructions."
### A2CLOUD: Clean up any downloaded packages to save limited filesystem space
sudo apt-get -y clean
if [[ $restartPrompt ]]; then
### A2CLOUD: Ask about restarting your system
echo
echo -n "Restart your $me now (not required, but recommended)? "
read
@ -1449,11 +1526,13 @@ if [[ $restartPrompt ]]; then
fi
fi
### A2CLOUD: Clean up temp files
cd "$origDir"
rm setup &>/dev/null
rm a2cloud-setup &>/dev/null
rm -rf /tmp/a2cloud-install &>/dev/null
### A2CLOUD: Finally restart the computer
[[ $doRestart ]] && sudo shutdown -r now
# version history: