#!/bin/sh
# ~/bin/net	by Julian H. Stacey
exit
# All of this file is to to be stripped, & any useful syntax moved elsewhere.

# can be called after manually establishing IP connection

# echo "Suggestions to keep coms link busy:"

# To save/justify phone bill, keep modem busy with routine transfers,
# so if you pause to think, the modem does not just idle wastefuly.
# Sups are resilient enough to live through modem line break + redial
# sequences, so never kill them & restart, as they take much time to get
# to point of establishing which files to transfer.

echo " xs kill -HUP \`head -1 /var/run/sendmail.pid\`"
echo " xs /usr/libexec/uucp/uucico -s mucev --force"
echo " slrnpull"
echo " cd /site ; xs rdist 2bsn"
echo " cd /site/domain/bsn.com/etc/alias;xs rdist -f /site/Distfile alias"
echo " xs rsh flat.berklix.com newaliases"
echo " xs rsh slim.berklix.com newaliases"
echo " xs rsh land.berklix.com newaliases"
# echo " cd ~/.html-data/..  ; rdist -f .html-data/Distfile  2muc"
echo " cd ~/public_html/.. ; rdist -f public_html/Distfile 2bsn"
echo " cd ~/public_html/.. ; rdist -f public_html/Distfile freefall"
# echo " cd ~/public_html;rsync --links --hard-links --perms --delete --compress --compress --recursive * freebsd.org:public_html"
echo " ports_make fetch"
echo " cd /usr/ports/distfiles ;
	find . -type f \( -name \*%\* -o -name \*skip=\* \) -exec ls -l {} \;
	ls -l /pub/*%*"
echo " du -s /var/spool/uucp/mucev"
echo " procmail.sh"
echo " ls /var/spool/mqueue ; mailq ; ps -laxww | grep sendmail | grep -v grep"

echo " cd /pub/freebsd/ref/current/ports;setenv PORTSDIR \`pwd\`;make -k fetch"
echo "fetchmail -u jhs-pop flat___.berklix.com"

# # Some sup control files to keep modem busy.
# SUP_OWNER=jhs	# who sup process should be called as
# SUP_FREEBSD_SRC=/usr/public/freebsd/ref/stable/sup/supfile
# SUP_INTERNATIONAL=/usr/public/freebsd/ref/internat/sup/supfile
# SUP_NETBSD_MAIN=/usr/public/netbsd/supfiles/netbsd_current_src_sunlamp
# SUP_NETBSD_ALT=/usr/public/netbsd/supfiles/netbsd_current_src_wipux2

# # Ensuring we have a sup $SUP_FREEBSD_SRC
# supfile=`basename $SUP_FREEBSD_SRC`
# pid=`ps ax | grep $supfile |grep -v grep|awk '{print $1;}'`
# #	awk '{print $1;}'		gets just the pid number
# if [ "X${pid}" != "X" ] ; then
# 	echo "$SUP_FREEBSD_SRC	already in use with PID ${pid}."
# 	# it might be an editor accessing the supfile, so show process.
# 	ps ax | grep $supfile |grep -v grep|grep ${pid}
# else
# 	echo " sup -v -d -z $SUP_FREEBSD_SRC"
# fi

# # Ensuring we have a sup $SUP_INTERNATIONAL
# supfile=`basename $SUP_INTERNATIONAL`
# pid=`ps ax |grep $supfile |grep -v grep|awk '{print $1;}'`
# if [ "X${pid}" != "X" ] ; then
# 	echo "$SUP_INTERNATIONAL	already in use with PID ${pid}."
# 	# it might be an editor accessing the supfile, so show process.
# 	# ps ax | grep $supfile |grep -v grep|grep ${pid}
# else
# 	echo " sup -v -d -z $SUP_INTERNATIONAL"
# fi

# # Ensuring we have a sup $SUP_NETBSD_MAIN or $SUP_NETBSD_ALT
# supfile=`basename $SUP_NETBSD_MAIN`
# pid=`ps ax | grep $supfile |grep -v grep|awk '{print $1;}'`
# if [ "X${pid}" != "X" ] ; then
# 	echo "$SUP_NETBSD_MAIN	already in use with PID ${pid}."
# 	# it might be an editor accessing the supfile, so show process.
# 	ps ax | grep $supfile |grep -v grep|grep ${pid}
# else
# 	supfile=`basename $SUP_NETBSD_ALT`
# 	pid=`ps ax|grep "sup $supfile" |grep -v grep|awk '{print $1;}'`
# 	if [ "X${pid}" != "X" ] ; then
# 		echo "$SUP_NETBSD_ALT	already in use with PID ${pid}."
# 		# it might be an editor accessing the supfile, so show process.
# 		ps ax | grep $supfile |grep -v grep|grep ${pid}
# 	else
# 		echo " sup -v -d -z -u $SUP_NETBSD_ALT"
# 		echo " sup -v -d -z -u $SUP_NETBSD_MAIN"
# 	fi
# fi
