diff --git a/.Docs/Command Guide.md b/.Docs/Command Guide.md index fc050c14..27100383 100644 --- a/.Docs/Command Guide.md +++ b/.Docs/Command Guide.md @@ -270,6 +270,12 @@ Example In this example, only those volumes that are attached to Slot 7 are listed. +### IRC + + irc ip|host port userid #channel + +**irc**, short for internet relay chat, is + ### KILL kill [-0|-1|-2] pid @@ -366,11 +372,29 @@ Normally **rm** displays each file name being deleted. With the Quiet option (* **SH** is one of the interactive and script processing shells under development for A2osX. The SH shell is similar to the BASH Shell in Linux and uses primarily the BASH syntax structure for scripting. A SH Shell Developers Guide is available in the Documentation Library of A2osX. +### SHUTDOWN + + shutdown [-t seconds] -r | systemfile + +**shutdown** is a utility that can be used to exit A2osX and either restart A2osX or optionally load and run another ProDOS system program (.SYSTEM, or type SYS). + +### STAT + + stat [-a] [-d] [-u] [-g] [-s] [-b] [-c] [-m] [-l] filespec + +**stat** is a utility for displaying the meta data associated with a file such as the access flags, modification date/time, and or owner id. When used without any options **stat** will return all the meta data. With one or more options, **stat** will only return the meta data for the options specified. These options are [-a] Access Flags, [-d] Mod Flags, [-u] User Owner ID, [-g] Group Owner ID, [-s] Size in bytes, [-b] Size in blocks, [-c] Creation date/time, [-m] Modification date/time, and [-l] Last access date/time. + ### TERM term The **TERM** command is used to start an interactive terminal (VT100) session using an available serial device. You must pass to **term** a valid device name (in lower case) in the form of /dev/comX where X is the slot number of your super serial card. You must have already installed the device driver for this card using the **INSDRV** command and specifying the **SSC.I.DRV**. When you execute the **insdrv ssc.i.drv** command it will search for an available (not used by another process) super serial card and will return to you the name of device installed (i.e. **com2**). Once you start a **TERM** session, you can disconnect from the remote host and return to the shell prompt by pressing Control-T. If you have more then one Apple running A2osX, you could set up one as a host with an SSC that has the right driver installed and a GETTY set for that device (see the User Guide) and then use the other Apple with an SSC to connect to the first one using **TERM**. + +### UNAME + + uname [-h] [-m] [-c] [-s] [-a] [-v] [-b] [-k] [-z] + +The **UNAME** command display information about the running machine. When used without any options **uname** will return the Machine Type/SubType, CPU Type, CPU Speed, Kernel Version, Kernel Build and Kernel Mode. With one or more options, **uname** will only return the data for the options specified, in the order given on the command line. These options are [-h] Host name, [-m] Machine Type/SubType, [-c] CPU Type, [-s] CPU Speed, [-a] Alternate CPU, [-v] Kernel Version, [-b] Kernel Build, [-k] Kernel Mode, and [-z] Kernel Timing. ### UNPAK diff --git a/ADMIN/adm.txt b/ADMIN/adm.txt index 7250bd4a..2d4e37f2 100644 --- a/ADMIN/adm.txt +++ b/ADMIN/adm.txt @@ -18,7 +18,7 @@ if [ $# = 0 ] echo "try \e[7mhelp adm\e[0m or \e[7madm commands\e[0m\n" exit fi -pushp $sapath +pushd $sapath if [ -f $1 ] $1 $2 $3 $4 $5 $6 $7 $8 $9 else diff --git a/ADMIN/update.txt b/ADMIN/update.txt index 332411b0..78169e41 100644 --- a/ADMIN/update.txt +++ b/ADMIN/update.txt @@ -7,66 +7,96 @@ AUTO 4,1 # It is used to update the current installation to the most # recent version over the internet using httpget # - -check that ${BOOT}tmp exists and if not create it -check again? if so fail? or RC check the MD/mkdir cmd? - -check for existing version file, if not there, set to A2osX/0.94/1111/ - -check for net loaded? do deep check? or just try to ping to update.a2osx.net? - -set netcheck = `ping -1 update.a2osx.net 2>/dev/null` - -if [$netcheck = "TCP/IP Not Loaded/Configured."] - echo Network Not Loaded +# Future Version of this script should add logging to /var/logging +# +if [ $# -ne 1 ] + echo "\nusage: \e[7madm update a2osx\e[0m\n\n or adm update package\n" + echo "for more information: \e[7mhelp adm update\e[0m\n" exit fi - -httpget update.a2osx.net -U latest -O ${BOOT}tmp/latest -compare latest and new -if newer... -httpget update.a2osx.net -U update.${build} -O ${BOOT}tmp/update - -unpak -fix stuff up like KMs -remove tmp files - -should any of these steps be logged somewhere? - -set helppath = ${BOOT}usr/share/help -if ![ -D ${helppath} ] - echo "\nA2osX Help files are not installed" - echo "Please update your A2osX installation\n" +if [ $1 != "a2osx" ] + echo "\nOnly \e[7madm update a2osx\e[0m is supported at this time\n" exit fi -switch $# +echo "\nA2osx Update Utility\n" +if [ -d ${BOOT}tmp ] +else + md ${BOOT}tmp + if [ $? -ne 0 ] + echo "\e[7mError\e[0m: creating tmp directory, exiting.\n" + exit + fi +fi +SET -E +#ping -1 update.a2osx.net > /dev/null 2> /dev/null +if [ -f ${BOOT}tmp/latest ] + rm -q ${BOOT}tmp/latest +fi +httpget update.a2osx.net -U latest -o ${BOOT}tmp/latest > /dev/null 2> /dev/null +set RC = $? +switch $RC case 0 - echo "\nNo Help Argument specified" - echo "try \e[7madm help help\e[0m for more command usage\n" - break - case 1 - if [ $1 = "list" ] OR [ $1 = "LIST" ] - ls -R ${helppath} - exit - fi - if [ -f $1 ] - set helpfile = ${helppath} + "/" + $1 - else - echo "Help is not available for ${1}" - echo "Try \e[7mhelp list\e[0m for a list of help topics\n" - exit + if ![ -f ${BOOT}tmp/latest ] + Echo "\e[7mError\e[0m: Something went teribly wrong!\n" fi break - case 2 - #check first that subdir exists then append full name and check that - break - case 3 - #check first that subdir and subdir exists then append full name and check that - break + case 120 + echo "\e[7mError\e[0m: Hardware Driver not loaded, exiting\n" + exit + case 39 + echo "\e[7mError\e[0m: Can not reach update server\n" + echo Try again later, exiting. + exit default - #we assume no more then 3 levels - #so this must be an error or should we just process this as same for case 3 and ignore 4+ + echo "\e[7mError\e[0m: Unknown error $RC\n" + echo Please contact development team + exit end - +. ${BOOT}tmp/latest +if [ -i $UBLD ] +else + echo "\e[7mError\e[0m: bad build number input\n" + exit +fi +if [ -f ${BOOT}etc/version ] +. ${BOOT}etc/version +else + #no current version file found use default + set BUILD = 1111 +fi +#Note only check build right now, need to check OS and VER +if [ $UBLD -le $BUILD ] + echo "\nYour system is already up to date!\n" + exit +else + echo "\nDownloading update...\n" + httpget update.a2osx.net -U update.${UBLD} -o ${BOOT}tmp/update.${UBLD} > /dev/null 2> /dev/null + set BSIZE = `stat -s ${BOOT}tmp/update.${UBLD}` + if [ $BSIZE -ne $USIZE ] + echo "\e[7mError\e[0m: Update did not completely download\n" + echo Please try again, exiting. + exit + fi + cd ${ROOT} + echo "\nInstalling update...\n" + unpak -p ${BOOT}tmp/update.${UBLD} + echo "\nUpdating KMs...\n" + for km in `ls ${ROOT}sys/km.*` + cp -q -y ${ROOT}sys/km/${km} ${ROOT}sys/${km} + next + echo "\nUpdating Version File...\n" + echo "SET OS = A2OSX" > ${BOOT}etc/version + echo "SET VER = 0.94" >> ${BOOT}etc/version + echo "SET BUILD = ${UBLD}" >> ${BOOT}etc/version + echo "\nUpdating Issue File...\n" + echo > ${BOOT}etc/issue + echo "Welcome to A2osX!" >> ${BOOT}etc/issue + echo >> ${BOOT}etc/issue + echo "Build No. ${UBLD}" >> ${BOOT}etc/issue + echo >> ${BOOT}etc/issue + rm -q ${BOOT}tmp/update.${UBLD} + echo "\nUpdate Complete...Rebooting\n" + shutdown -r -t 3 +fi MAN -TEXT /MAKE/usr/share/adm/update \ No newline at end of file +TEXT /MAKE/usr/share/adm/update diff --git a/MAKE/FULLFILES.txt b/MAKE/FULLFILES.txt index ca7e9731..7aa0668e 100644 --- a/MAKE/FULLFILES.txt +++ b/MAKE/FULLFILES.txt @@ -27,11 +27,13 @@ bin/cp bin/csh bin/cut bin/dnsinfo +bin/du bin/edit bin/format bin/forth bin/grep bin/gtest +bin/hmacmd5 bin/httpget bin/ipconfig bin/irc @@ -41,6 +43,7 @@ bin/lc bin/ls bin/lsdev bin/lsof +bin/md4 bin/md5 bin/mem bin/memdump @@ -48,13 +51,16 @@ bin/mkdir bin/more bin/mv bin/netstat +bin/nl bin/nscutil bin/ntpdate +bin/od bin/pak bin/pakme bin/ping bin/ps bin/rm +bin/sed bin/sh bin/shutdown bin/stat @@ -68,6 +74,7 @@ bin/userdel bin/usermod bin/wc bin/who +bin/xargs drv/dhgr.drv drv/lancegs.drv drv/pppssc.drv @@ -121,7 +128,7 @@ lib/libblkdev lib/libcifs lib/libpak lib/libtcpip -root/acostest.s +root/acostest.a root/GF root/helloworld.f root/mandelbrot.f diff --git a/MAKE/M2CPPPFILES.txt b/MAKE/M2CPPPFILES.txt index 50a0b0bf..c7836628 100644 --- a/MAKE/M2CPPPFILES.txt +++ b/MAKE/M2CPPPFILES.txt @@ -43,6 +43,5 @@ sbin/insdrv sbin/login sbin/networkd sbin/telnetd -sys/km.vsdrive MAN TEXT /MAKE/USR/SHARE/MAKE/M2CPPPFILES diff --git a/MAKE/MAKE2C.txt b/MAKE/MAKE2C.txt index cea6e304..961dd373 100644 --- a/MAKE/MAKE2C.txt +++ b/MAKE/MAKE2C.txt @@ -84,6 +84,7 @@ FOR FILE IN (m2cpppfiles) cp -Q -Y ${SRC}/${FILE} /PPPBOOT/${FILE} NEXT cp -Q -Y ${SRC}/sys/kernel.PAKED /PPPBOOT/sys/kernel +cp -Q -Y ${SRC}/sys/km/km.vsdrive /PPPBOOT/sys/km.vsdrive cp -Q -Y initboot /PPPBOOT/etc/init ECHO "Welcome to A2osX!" > /PPPBOOT/etc/issue ECHO >> /PPPBOOT/etc/issue diff --git a/MAKE/MAKEFULL.txt b/MAKE/MAKEFULL.txt index bd050480..5612ec71 100644 --- a/MAKE/MAKEFULL.txt +++ b/MAKE/MAKEFULL.txt @@ -113,7 +113,7 @@ md /FULLBOOT/var md /FULLBOOT/var/log ECHO "Copying Files..." FOR FILE IN (fullfiles) - cp ${SRC}/${FILE} /FULLBOOT/${FILE} + cp -q ${SRC}/${FILE} /FULLBOOT/${FILE} NEXT cp -Q -Y $PDOSFILE /FULLBOOT/ProDOS cp -Q -Y initboot /FULLBOOT/etc/init @@ -127,9 +127,11 @@ IF [ $PDOS -eq 1 ] REN /FULLBOOT FULLBOOT FI cp -q helloworld.s /FULLBOOT/root/helloworld.s -cp -q /MAKE/assets/PRODOS242/BASIC.SYSTEM /FULLBOOT/bin/Basic +cp -q /MAKE/assets/Basic /FULLBOOT/bin/Basic cp -q /MAKE/SCASM3.SYSTEM /FULLBOOT/bin/SC3 -cp -q /MAKE/assets/PRODOS242/COPYIIPLUS.8.4 /FULLBOOT/bin/CP2Plus +cp -q /MAKE/usr/share/adm/adm /FULLBOOT/bin/adm +cp -q /MAKE/usr/share/adm/help /FULLBOOT/bin/help +cp -q /MAKE/usr/share/adm/update /FULLBOOT/usr/share/adm/update ECHO "FULLBOOT Disk Created!" MAN TEXT /MAKE/USR/SHARE/MAKE/MAKEFULL diff --git a/MAKE/MAKEFULL32.txt b/MAKE/MAKEFULL32.txt index 9ed2f9d5..8f55f083 100644 --- a/MAKE/MAKEFULL32.txt +++ b/MAKE/MAKEFULL32.txt @@ -108,9 +108,12 @@ ECHO $IM >> /FULLBOOT/etc/issue cp -Q tcpip.conf /FULLBOOT/etc/tcpip.conf cp -Q profile /FULLBOOT/root/profile cp -q helloworld.s /FULLBOOT/root/helloworld.s -cp -q /MAKE/assets/PRODOS242/BASIC.SYSTEM /FULLBOOT/bin/Basic +cp -q /MAKE/assets/Basic /FULLBOOT/bin/Basic cp -q /MAKE/SCASM3.SYSTEM /FULLBOOT/bin/SC3 cp -q /MAKE/assets/PRODOS242/COPYIIPLUS.8.4 /FULLBOOT/bin/CP2Plus +cp -q /MAKE/usr/share/adm/adm /FULLBOOT/bin/adm +cp -q /MAKE/usr/share/adm/help /FULLBOOT/bin/help +cp -q /MAKE/usr/share/adm/update /FULLBOOT/usr/share/adm/update ECHO "FULLBOOT 32mb Disk Created!" MAN TEXT /MAKE/USR/SHARE/MAKE/MAKEFULL32 diff --git a/MAKE/MAKEUPDATE.txt b/MAKE/MAKEUPDATE.txt index 4223b0aa..ef7ba2a8 100644 --- a/MAKE/MAKEUPDATE.txt +++ b/MAKE/MAKEUPDATE.txt @@ -46,11 +46,18 @@ md /MAKE/update/root md /MAKE/update/sbin md /MAKE/update/sys md /MAKE/update/sys/km +md /MAKE/update/usr +md /MAKE/update/usr/share +md /MAKE/update/usr/share/adm ECHO "Copying Files..." FOR FILE IN (updatefiles) cp -Y -Q ${SRC}/${FILE} /MAKE/update/${FILE} NEXT +cp -q /MAKE/assets/Basic /MAKE/update/bin/Basic cp -Y -Q ${SRC}/PRODOS.FX /MAKE/update/ProDOS +cp -q /MAKE/usr/share/adm/adm /MAKE/update/bin/adm +cp -q /MAKE/usr/share/adm/help /MAKE/update/bin/help +cp -q /MAKE/usr/share/adm/update /MAKE/update/usr/share/adm/update cd /MAKE/update pak update.${B} -r * ECHO "Update Created!" diff --git a/MAKE/UPDATEFILES.txt b/MAKE/UPDATEFILES.txt index f313d452..743a1b2c 100644 --- a/MAKE/UPDATEFILES.txt +++ b/MAKE/UPDATEFILES.txt @@ -4,6 +4,7 @@ AUTO 4,1 A2osX.logo A2OSX.SYSTEM bin/acc +bin/acos bin/arp bin/asm bin/asm.6502 @@ -26,6 +27,7 @@ bin/cp bin/csh bin/cut bin/dnsinfo +bin/du bin/edit bin/format bin/forth @@ -40,6 +42,7 @@ bin/lc bin/ls bin/lsdev bin/lsof +bin/md4 bin/md5 bin/mem bin/memdump @@ -47,13 +50,16 @@ bin/mkdir bin/more bin/mv bin/netstat +bin/nl bin/nscutil bin/ntpdate +bin/od bin/pak bin/pakme bin/ping bin/ps bin/rm +bin/sed bin/sh bin/shutdown bin/stat @@ -67,6 +73,7 @@ bin/userdel bin/usermod bin/wc bin/who +bin/xargs drv/dhgr.drv drv/lancegs.drv drv/pppssc.drv