View Single Post
  #21  
Old May 14th 18, 08:18 AM posted to alt.computer.workshop,rec.photo.digital,comp.sys.mac.system,comp.sys.mac.apps
David B.[_2_]
external usenet poster
 
Posts: 195
Default Effective defenses against malware and other threats on Applecomputers

On 14/05/2018 01:35, Tyrone F. Horneigh wrote:
On 5/13/18 4:09 AM, David B. wrote:

I've no doubt forgotten more about computers that you have ever learned!


You wish.


Oh dear. :-( Seems I got that wrong. My apologies.

The strange thing is, my computer seems to be working perfectly WITHOUT
that script you mention. There's a question about it he-

https://www.bleepingcomputer.com/for...k-my-question/

Can YOU answer it?

Btw, your 'handle' meant absolutely nothing to me until just now!

https://en.wikipedia.org/wiki/Arte_Johnson


Discuss the EBCDIC character set differences between an IBM 129
keypunch/verifier and a Honeywell 200 mainframe.

What is the difference between a JP and JR instruction in Z80 assembly,
and why would you use one over the other?

Wire wrapping a computer board was a slow and error-prone process, but
the end result had a distinct advantage over printed circuits at the
time.Â*Â* What was that?

What were the pros and cons of 8 inch floppy drives, compared to 5.25 inch?

What is a logic probe?

Why did Apple switch processors in 2005?

What is the purpose of the following code?

##
# Common setup for startup scripts.
##
# Copyright 1998-2002 Apple Computer, Inc.
##

#######################
# Configure the shell #
#######################

##
# Be strict
##
#set -e
set -u

##
# Set command search path
##
PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec:/System/Library/CoreServices;
export PATH

##
# Set the terminal mode
##
#if [ -x /usr/bin/tset ] && [ -f /usr/share/misc/termcap ]; then
#Â*Â*Â* TERM=$(tset - -Q); export TERM
#fi

####################
# Useful functions #
####################

##
# Determine if the network is up by looking for any non-loopback
# internet network interfaces.
##
CheckForNetwork()
{
Â*Â*Â* local test

Â*Â*Â* if [ -z "${NETWORKUP:=}" ]; then
Â*Â*Â* test=$(ifconfig -a inet 2/dev/null | sed -n -e '/127.0.0.1/d' -e
'/0.0.0.0/d' -e '/inet/p' | wc -l)
Â*Â*Â* if [ "${test}" -gt 0 ]; then
Â*Â*Â*Â*Â*Â*Â* NETWORKUP="-YES-"
Â*Â*Â* else
Â*Â*Â*Â*Â*Â*Â* NETWORKUP="-NO-"
Â*Â*Â* fi
Â*Â*Â* fi
}

alias ConsoleMessage=echo

##
# Process management
##
GetPID ()
{
Â*Â*Â* local program="$1"
Â*Â*Â* local pidfile="${PIDFILE:=/var/run/${program}.pid}"
Â*Â*Â* localÂ*Â*Â*Â* pid=""

Â*Â*Â* if [ -f "${pidfile}" ]; then
Â*Â*Â* pid=$(head -1 "${pidfile}")
Â*Â*Â* if ! kill -0 "${pid}" 2 /dev/null; then
Â*Â*Â*Â*Â*Â*Â* echo "Bad pid file $pidfile; deleting."
Â*Â*Â*Â*Â*Â*Â* pid=""
Â*Â*Â*Â*Â*Â*Â* rm -f "${pidfile}"
Â*Â*Â* fi
Â*Â*Â* fi

Â*Â*Â* if [ -n "${pid}" ]; then
Â*Â*Â* echo "${pid}"
Â*Â*Â* return 0
Â*Â*Â* else
Â*Â*Â* return 1
Â*Â*Â* fi
}

##
# Generic action handler
##
RunService ()
{
Â*Â*Â* case $1 in
Â*Â*Â*Â*Â* startÂ* ) StartServiceÂ*Â* ;;
Â*Â*Â*Â*Â* stopÂ*Â* ) StopServiceÂ*Â*Â* ;;
Â*Â*Â*Â*Â* restart) RestartService ;;
Â*Â*Â*Â*Â* *Â*Â*Â*Â*Â* ) echo "$0: unknown argument: $1";;
Â*Â*Â* esac
}



--

A real puzzle to *ME* - how can my Apple computer work *without* it?!!!

I have found this, but it doesn't answer my question - or does it? ;-)

https://scriptingosx.com/2018/02/set...th-in-scripts/

--
David B.