File:  [Power 6/32 Unix Tahoe 4.2BSD] / cci / d / network.atp / ether_burn
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Sun Jul 28 12:24:19 2019 UTC (7 years ago) by root
Branches: bsd, MAIN
CVS tags: v12b, v121, HEAD
Power 6/32 Unix version 1.2b

#!/bin/sh
#
# set up a variable to create individual file names with
#
who=`whoami`
#
# save current working directory
#
savdir=`pwd`
#
# make sure we are in our home directory
#
chdir /1a/ether/${who}
echo
echo "** Execute the 'rwho' command to show who is **"
echo "** currently logged in to the network.       **"
echo
echo "rwho -a"
rwho -a
echo
echo "** Execute the 'ruptime' command to show the usage on **"
echo "** the systems.                                       **"
echo
echo "/usr/ucb/ruptime -a"
/usr/ucb/ruptime -a
echo
echo "** Execute the 'nstat' command to show configured **"
echo "** systems in the network.                        **"
echo
echo "/etc/nstat -i"
/etc/nstat -i
sleep 10
echo
echo "** Copy the files /atp/ether and /etc/termcap **"
echo "** to the remote computer.                    **"
echo
echo "rcp /atp/ether $remote:/1a/ether/${who}/${who}_ether.cp"
rcp /atp/ether $remote:/1a/ether/${who}/${who}_ether.cp
if  (test $? -ne 0)
	then
		echo 
		echo " ##### Remote copy command failed. Check #####"
		echo " ##### cabling connections and/or hard-  #####"
		echo " ##### ware configuration for errors.    #####"
		echo
		echo " #####             ATP Failed            #####"
		echo
		echo "1" > /1a/ether/${who}/${who}_stat
else
echo "rcp /etc/termcap $remote:/1a/ether/${who}/${who}_etc_term.cp"
rcp /etc/termcap $remote:/1a/ether/${who}/${who}_etc_term.cp
if  (test $? -ne 0)
	then
		echo 
		echo " ##### Remote copy command failed. Check #####"
		echo " ##### cabling connections and/or hard-  #####"
		echo " ##### ware configuration for errors.    #####"
		echo
		echo " #####             ATP Failed            #####"
		echo
		echo "1" > /1a/ether/${who}/${who}_stat
else
echo
echo "** List the $remote /1a/ether/${who} directory to show **"
echo "** that we copied /atp/ether and /etc/termcap from the **"
echo "** host computer into /1a/ether/${who}.                **"
echo
echo "rsh $remote ls -lg /1a/ether/${who}"
echo
rsh $remote ls -lg /1a/ether/${who}
if (test $? -ne 0)
	then
		 echo
		 echo "##### Unable to list directory. Check #####"
		 echo "##### to see if it exists.            #####"
		 echo
		 echo "#####           ATP Failed            #####"
		 echo
		 echo "1" > /1a/ether/${who}/${who}_stat
else
echo
sleep 10
echo "** Copy the remote files we just created **"
echo "** back into the local computer.         **"
echo
echo "rcp $remote:/1a/ether/${who}/${who}_ether.cp /1a/ether/${who}/${who}_ether.cp"
rcp $remote:/1a/ether/${who}/${who}_ether.cp /1a/ether/${who}/${who}_ether.cp
if (test $? -ne 0)
	then
		 echo
		 echo "##### Remote copy command failed. Check #####"
		 echo "##### to see if remote files exist.     #####"
		 echo
		 echo "#####            ATP Failed             #####"
		 echo
		 echo "1" > /1a/ether/${who}/${who}_stat
else
echo "rcp $remote:/1a/ether/${who}/${who}_etc_term.cp /1a/ether/${who}/${who}_etc_term.cp"
rcp $remote:/1a/ether/${who}/${who}_etc_term.cp /1a/ether/${who}/${who}_etc_term.cp
if (test $? -ne 0)
	then
		 echo
		 echo "##### Remote copy command failed. Check #####"
		 echo "##### to see if remote files exist.     #####"
		 echo
		 echo "#####            ATP Failed             #####"
		 echo
		 echo "1" > /1a/ether/${who}/${who}_stat
else
echo
echo "** We should now see the files ${who}_ether.cp and **"
echo "** ${who}_etc_term.cp in the /1a/ether/${who} dir- **"
echo "** ectory.                                         **"
echo
echo "ls -lg"
echo
ls -lg 
if  (test $? -ne 0)
	then
		echo 
		echo " ##### Unable to list directory. Check #####"
		echo " ##### to see if files were copied.    #####"
		echo
		echo " #####            ATP Failed           #####"
		echo
		echo "1" > /1a/ether/${who}/${who}_stat
else
echo 
echo "** Create a file for in the remote system for **"
echo "** manipulation later by the host system.     **"
echo
echo "rsh $remote cp /etc/termcap /1a/ether/${who}/${who}_test_ether"
echo
rsh $remote cp /etc/termcap /1a/ether/${who}/${who}_test_ether
if (test $? -ne 0)
	then
		 echo
		 echo "##### Unable to create file. Check to #####"
		 echo "##### see if '/1a/ether/${who}' dir-  #####"
		 echo "##### ectory in the remote is intact. #####"
		 echo
		 echo "#####           ATP Failed            #####"
		 echo
		 echo "1" > /1a/ether/${who}/${who}_stat
else
echo "** List the /1a/ether/${who} directory to show the **"
echo "** file we created.                                **"
echo
echo "rsh $remote ls -lg /1a/ether/${who}"
echo
rsh $remote ls -lg /1a/ether/${who}
if  (test $? -ne 0)
	then
		echo 
		echo " ##### Unable to list remote directory. #####"
		echo " ##### Check to see if it is intact.    #####"
		echo
		echo " #####             ATP Failed           #####"
		echo
		echo "1" > /1a/ether/${who}/${who}_stat
else
sleep 10
echo
echo "** Do a 'diff' on files /atp/ether and     **"
echo "** /1a/ether/${who}/${who}_ether.cp. There **"
echo "** should not be any differences printed.  **"
echo
echo "diff /atp/ether /1a/ether/${who}/${who}_ether.cp"
diff /atp/ether /1a/ether/${who}/${who}_ether.cp
if  (test $? -ne 0)
	then
		echo 
		echo " ##### There are differences in the files. #####"
		echo " ##### Data integrity compromised during   #####"
		echo " ##### transfer or file not transferred.   #####"
		echo
		echo " #####             ATP Failed              #####"
		echo
		echo "1" > /1a/ether/${who}/${who}_stat
else
echo
echo "** Do a 'diff' on files /etc/termcap and **"
echo "** /1a/ether/${who}/${who}_etc_term.cp.  **"
echo "** There should not be any differences   **"
echo "** printed.                              **"
echo
echo "diff /etc/termcap /1a/ether/${who}/${who}_etc_term.cp"
diff /etc/termcap /1a/ether/${who}/${who}_etc_term.cp
if  (test $? -ne 0)
	then
		echo 
		echo " ##### There are differences in the files. #####"
		echo " ##### Data integrity compromised during   #####"
		echo " ##### transfer or file not transferred.   #####"
		echo
		echo " #####             ATP Failed              #####"
		echo
		echo "1" > /1a/ether/${who}/${who}_stat
else
echo
echo
echo "** Do a 'mv' command on file the we created in the remote **"
echo "** using the 'rsh' command.                               **"
echo
echo "rsh $remote mv ${who}_test_ether ${who}_old.test_ether"
rsh $remote mv ${who}_test_ether ${who}_old.test_ether
if  (test $? -ne 0)
	then
		echo 
		echo " ##### Unable to move remote file. Check #####"
		echo " ##### to see if it was created.         #####"
		echo
		echo " #####             ATP Failed            #####"
		echo
		echo "1" > /1a/ether/${who}/${who}_stat
else
echo
echo "** List the directory to see that we changed the name. **"
echo
echo "rsh $remote ls -lg /1a/ether/${who}"
echo
rsh $remote ls -lg /1a/ether/${who}
if  (test $? -ne 0)
	then
		echo 
		echo " ##### Unable to list remote directory. #####"
		echo " ##### to see if it is intact.          #####"
		echo
		echo " #####            ATP Failed            #####"
		echo
		echo "1" > /1a/ether/${who}/${who}_stat
else
# 
# put the user back where he was before we started
#
chdir $savdir
#
# make sure the mess we made is gone
#
rsh $remote rm -f /1a/ether/${who}/${who}_old.test_ether
rm -f /1a/ether/${who}/${who}_old.test_ether
rsh $remote rm -f /1a/ether/${who}/${who}_ether.cp 
rm -f /1a/ether/${who}/${who}_ether.cp
rsh $remote rm -f /1a/ether/${who}/${who}_etc_term.cp
rm -f /1a/ether/${who}/${who}_etc_term.cp
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi
fi

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.