mirror of
				https://github.com/RasppleII/a2server.git
				synced 2025-10-30 23:16:08 +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 | ||||||
| @@ -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" | ||||||
| @@ -120,7 +120,7 @@ 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 | ||||||
|   | |||||||
| @@ -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" | ||||||
|   | |||||||
| @@ -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" ;; | ||||||
| @@ -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 | ||||||
|   | |||||||
| @@ -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 | ||||||
|   | |||||||
| @@ -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 | ||||||
|   | |||||||
| @@ -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): | ||||||
| @@ -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) | ||||||
| @@ -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:" | ||||||
| @@ -282,9 +280,10 @@ if (( $doSetup )); then | |||||||
|             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 | ||||||
|   | |||||||
| @@ -95,3 +95,7 @@ | |||||||
| [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) | ||||||
|   | |||||||
| @@ -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