mirror of
https://github.com/RasppleII/a2server.git
synced 2026-04-21 05:16:39 +00:00
Remove trailing whitespace
An unusual quirk of git is that it tends not to like trailing whitespace at the end of lines, and trailing blank lines at the end of a file. It messes with the word diffs a bit I think. Anyway, it's easily removed, so I've removed it.
This commit is contained in:
@@ -75,12 +75,3 @@ alias a2files-share="sudo sed -i 's/^\/media\/A2SHARED\/A2FILES\ A2FILES options
|
||||
alias a2files-unshare="sudo sed -i 's/^#share2/\/media\/A2SHARED\/A2FILES\ A2FILES options:prodos\ casefold:toupper/' /usr/local/etc/netatalk/AppleVolumes.default; [[ -d /media/A2SHARED/A2FILES ]] || mkdir /media/A2SHARED/A2FILES"
|
||||
|
||||
alias showalias="alias | cut -d= -f 1 | cut -d' ' -f2 | more"
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ showip: show the current ethernet IP address of the server
|
||||
showmac: show the MAC (Ethernet hardware) address of the server
|
||||
showip-wifi: show the current wifi IP address of the server
|
||||
showmac-wifi: show the MAC (wifi hardware) address of the server
|
||||
ifreset: reset all network interfaces (requires restart)
|
||||
ifreset: reset all network interfaces (requires restart)
|
||||
|
||||
netatalk-stop: stop the netatalk service until reboot
|
||||
netatalk-start: start the netatalk service
|
||||
@@ -57,7 +57,7 @@ netboot-p8-guest: set guests to netboot into ProDOS 8 (default)
|
||||
note: when a IIgs is set to network boot into GS/OS, using the Network
|
||||
control panel or the NETBOOT.GSOS utility, guests will behave like
|
||||
registered users, and ignore the netboot setting of the guest user
|
||||
|
||||
|
||||
guest-off: disallow guest access to A2SERVER
|
||||
guest-on: allow guest access to A2SERVER (default)
|
||||
note: by default, Guest access is the only way to network boot into
|
||||
@@ -83,4 +83,3 @@ afpsync: register files introduced outside of AFP with netatalk
|
||||
mkatinit: set up network boot configuration files
|
||||
cppo: catalog and copy files from ProDOS image file (slow, but works)
|
||||
(add -h to show help for the above four commands, e.g. "afptype -h")
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@ while [[ $1 == "-r" || $1 == "-e" || $1 = "-v" ]]; do
|
||||
force=1
|
||||
shift
|
||||
fi
|
||||
|
||||
|
||||
if [[ $1 == "-e" ]]; then
|
||||
showerrors=1
|
||||
shift
|
||||
@@ -103,7 +103,7 @@ else
|
||||
if [[ $1 ]]; then
|
||||
sharepath=$(readlink -m $1)
|
||||
processPath
|
||||
else
|
||||
else
|
||||
grep ^/media /usr/local/etc/netatalk/AppleVolumes.default | \
|
||||
while read line; do
|
||||
[[ $(echo $line | grep toupper) ]]; nocasefold=$?
|
||||
@@ -111,4 +111,4 @@ else
|
||||
processPath nocasefold
|
||||
done
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
+11
-11
@@ -295,7 +295,7 @@ exit_usage () {
|
||||
echo " two hex digits for untypeables (note: use '\xZZ' for 00)."
|
||||
echo "ProDOS type should be two hex digits, and auxtype should be four;"
|
||||
echo " type can alternatively be BAS, BIN, INT, P16, S16, SHK, SYS, TXT."
|
||||
echo "-q skips recheck of file (show types) after setting"
|
||||
echo "-q skips recheck of file (show types) after setting"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
@@ -359,7 +359,7 @@ while [[ $1 && ( "${1:0:1}" == '-' ) ]]; do
|
||||
continue
|
||||
else
|
||||
exit_usage
|
||||
break
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -393,7 +393,7 @@ for filename in $@; do
|
||||
fi
|
||||
|
||||
entrycount=`readcharDec "$filename" 25`
|
||||
|
||||
|
||||
entry=1
|
||||
offset=29
|
||||
|
||||
@@ -406,7 +406,7 @@ for filename in $@; do
|
||||
(( offset = (entry * 12 + 29) - 12 ))
|
||||
done
|
||||
(( entry > entrycount )) && continue
|
||||
|
||||
|
||||
(( offset = offset + 3 ))
|
||||
(( tposHi = $(readcharDec "$filename" $offset) * 256 ))
|
||||
(( offset = offset + 1 ))
|
||||
@@ -414,7 +414,7 @@ for filename in $@; do
|
||||
(( cpos = tpos + 4 ))
|
||||
(( ppos = tpos + 1 ))
|
||||
(( apos = tpos + 2 ))
|
||||
|
||||
|
||||
if [[ $p || $a || $t || $c ]]; then # set
|
||||
if [[ $p || $a ]]; then
|
||||
if [[ $p ]]; then
|
||||
@@ -447,9 +447,9 @@ for filename in $@; do
|
||||
|
||||
type="$(readchars "$filename" $tpos 4)"
|
||||
creator="$(readchars "$filename" $cpos 4)"
|
||||
|
||||
|
||||
echo -n "$linestart"
|
||||
|
||||
|
||||
if [[ $creator != "pdos" || ( ( $type != "TEXT" ) \
|
||||
&& ( $type != "PSYS" ) && ( ${type:0:1} != "p" ) ) ]]; then
|
||||
if [[ $creator || $type ]]; then
|
||||
@@ -459,7 +459,7 @@ for filename in $@; do
|
||||
fi
|
||||
continue
|
||||
fi
|
||||
|
||||
|
||||
if [[ $type == "TEXT" ]]; then
|
||||
pdosType="\$04 [TXT]"
|
||||
pdosAuxType='$0000'
|
||||
@@ -475,14 +475,14 @@ for filename in $@; do
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
(( tpos=tpos+1 ))
|
||||
auxTypeHi=$(readcharHex "$filename" $tpos)
|
||||
(( tpos=tpos+1 ))
|
||||
auxTypeLo=$(readcharHex "$filename" $tpos)
|
||||
pdosAuxType=$auxTypeHi$auxTypeLo
|
||||
fi
|
||||
|
||||
|
||||
echo "ProDOS file. Type:\$$pdosType AuxType:\$$pdosAuxType"
|
||||
fi
|
||||
|
||||
@@ -495,4 +495,4 @@ done
|
||||
# test on lunix
|
||||
# test inside and outside of AD directory, and from other dirs (both cases)
|
||||
# finish conversion writebyte/readchar library
|
||||
# consider return 2 for missing parameters for subroutines
|
||||
# consider return 2 for missing parameters for subroutines
|
||||
|
||||
@@ -132,7 +132,7 @@ def getFileName(arg1, arg2):
|
||||
def getFileType(arg1, arg2):
|
||||
start = getStartPos(arg1, arg2)
|
||||
return readcharHex(g.imageData, start+16)
|
||||
|
||||
|
||||
def getKeyPointer(arg1, arg2):
|
||||
start = getStartPos(arg1, arg2)
|
||||
return (readcharDec(g.imageData, start+17) +
|
||||
@@ -364,7 +364,7 @@ def processEntry(arg1, arg2):
|
||||
if g.PDOSPATH_SEGMENT:
|
||||
syncExit()
|
||||
g.targetName = None
|
||||
|
||||
|
||||
#else:
|
||||
#print(g.activeFileName + " doesn't match " + g.PDOSPATH_SEGMENT)
|
||||
|
||||
@@ -505,7 +505,7 @@ def binToDec(arg1):
|
||||
# arg: binary string up to 8 bits
|
||||
# out: decimal value
|
||||
return to_dec([arg1])
|
||||
|
||||
|
||||
def binToHex(arg1):
|
||||
# converts single-byte binary string (8 bits) value to hex
|
||||
# warning: no error checking
|
||||
@@ -699,10 +699,10 @@ def to_bytes(val):
|
||||
else:
|
||||
raise Exception(
|
||||
"to_bytes() requires hex-ustr, int/long, or [bin-ustr]")
|
||||
|
||||
|
||||
def shift(items):
|
||||
"""Shift list items to left, losing the first item.
|
||||
|
||||
|
||||
in : list
|
||||
out: list
|
||||
"""
|
||||
@@ -710,7 +710,7 @@ def shift(items):
|
||||
items[i] = items[i+1]
|
||||
del items[-1]
|
||||
return items
|
||||
|
||||
|
||||
def s(string):
|
||||
"""Perform local variable substution, e.g. 'total: {num} items'"""
|
||||
# http://stackoverflow.com/questions/2960772/
|
||||
@@ -879,4 +879,3 @@ else:
|
||||
processDir(2)
|
||||
if not g.DIR:
|
||||
syncExit()
|
||||
|
||||
|
||||
+12
-13
@@ -96,7 +96,7 @@ while [ -n "$1" ] && [ "${1:0:1}" = '-' ]; do
|
||||
continue
|
||||
else
|
||||
badflag=1
|
||||
break
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
@@ -156,10 +156,10 @@ while : ; do
|
||||
prefix="$gsprefix"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# make username all caps
|
||||
username=`echo $username | tr '[:lower:]' '[:upper:]'`
|
||||
|
||||
|
||||
# prompt for folders
|
||||
if [ ! $doalsoguest ] && [ ! $noprompt ]; then
|
||||
while : ; do
|
||||
@@ -174,7 +174,7 @@ while : ; do
|
||||
fi
|
||||
break
|
||||
done
|
||||
|
||||
|
||||
while : ; do
|
||||
echo "Enter the initial ProDOS prefix:"
|
||||
echo "default (CR to accept): $prefix"
|
||||
@@ -188,10 +188,10 @@ while : ; do
|
||||
break
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
# create folders if needed
|
||||
filepath="$PWD/$filename"
|
||||
|
||||
|
||||
while [ $usersfolder -eq 1 ]; do
|
||||
# create folders for ATINIT
|
||||
while [ ! -d "$sharepath" ]; do
|
||||
@@ -199,7 +199,7 @@ while : ; do
|
||||
echo "Enter the local path to the netatalk shared volume used for netboot:"
|
||||
read sharepath
|
||||
done
|
||||
|
||||
|
||||
if [ ! -d "$sharepath/USERS" ]; then
|
||||
mkdir "$sharepath/USERS"
|
||||
if [ $? -ne 0 ]; then
|
||||
@@ -222,12 +222,12 @@ while : ; do
|
||||
break
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
# we have a valid USERS folder target for ATINIT
|
||||
filepath="$sharepath/USERS/$username/SETUP/$filename"
|
||||
usersfolder=2
|
||||
done
|
||||
|
||||
|
||||
if [ $usersfolder -eq 1 ]; then
|
||||
echo "Could not write to shared volume. Creating ATINIT in current directory."
|
||||
if [ -n "$alsoguest" ]; then
|
||||
@@ -242,7 +242,7 @@ while : ; do
|
||||
echo "netboot start prefix : $prefix"
|
||||
echo
|
||||
fi
|
||||
|
||||
|
||||
#remove ATINIT if present
|
||||
if [ ! $overwrite ] && [ -f "$filepath" ]; then
|
||||
echo -n "$filepath already exists. Overwrite? "
|
||||
@@ -259,7 +259,7 @@ while : ; do
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
|
||||
#write the file. start with zeroes
|
||||
dd if=/dev/zero of="$filepath" bs=1 count=276 2> /dev/null
|
||||
#put in startprog, prefix, username (first byte of each field is length)
|
||||
@@ -269,7 +269,7 @@ while : ; do
|
||||
( decToChar "${#startprog}"; echo -n "$startprog"; ) | writechars "$filepath" 7
|
||||
( decToChar "${#prefix}"; echo -n "$prefix"; ) | writechars "$filepath" 78
|
||||
( decToChar "${#username}"; echo -n "$username"; ) | writechars "$filepath" 143
|
||||
|
||||
|
||||
echo "Created $filepath"
|
||||
if [ ! $alsoguest ]; then
|
||||
break
|
||||
@@ -283,4 +283,3 @@ while : ; do
|
||||
done
|
||||
|
||||
echo
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ while [[ $1 == "-f" || $1 == "-c" ]]; do
|
||||
force=1
|
||||
shift
|
||||
fi
|
||||
|
||||
|
||||
if [[ $1 == "-c" ]]; then
|
||||
mixedcase=1
|
||||
shift
|
||||
|
||||
Reference in New Issue
Block a user