*BSD News Article 85056


Return to BSD News archive

Newsgroups: comp.bugs.2bsd
Path: euryale.cc.adfa.oz.au!newshost.carno.net.au!harbinger.cc.monash.edu.au!news.cs.su.oz.au!inferno.mpx.com.au!news.unimelb.EDU.AU!munnari.OZ.AU!news.Hawaii.Edu!news.uoregon.edu!hunter.premier.net!www.nntp.primenet.com!nntp.primenet.com!mindspring!uunet!in2.uu.net!206.64.182.7!news.thenet.net!wlbr!moe.2bsd.com!sms
From: sms@moe.2bsd.com (Steven M. Schultz)
Subject: The Grand Reorganization Continues (#344 - 1 of 8)
Organization: 2BSD, Simi Valley CA USA
Message-ID: <E28Dsy.J0q@moe.2bsd.com>
Date: Wed, 11 Dec 1996 04:00:34 GMT
Lines: 1359
Xref: euryale.cc.adfa.oz.au comp.bugs.2bsd:707

Subject: The Grand Reorganization Continues (#344 - 1 of 8)
Index:	MANY(mostly etc)/MANY 2.11BSD

Description:
	This is a continuation of the directory reorganization started
	in updates #335 thru 342.

	That series of updates was aimed at cleaning up /usr/lib (and to a
	very small extent /etc).  This series of updates (#344 thru 351)
	(almost) completes the reorganization by dispersing all but the
	config files from /etc into /sbin, /usr/sbin, /usr/libexec, usw.

Repeat-By:
	This is extracted from #335:

	"By observation and/or having to admin a mixture of 2.11BSD systems
	and systems which use the post 1989/90 directory hierarchy.

	Alternatively you may have, over the years, been one of the folks
	who has asked me "when is the directory layout going to be updated to
	reflect current 'standards'?""

Fix:
	This is #344 (part 1 of 8).

	Updates #344 thru #351 comprise the 8 part kit which moves everything
	that is not a config file out of /etc.

	NOTE: All executables in /etc *EXCEPT* /etc/init and /etc/autoconfig
	      are relocated by this update.  Those two programs were left in
	      /etc because:
	      
			/etc/init is known to the kernel - moving 'init'
			without changing the kernel would render the system
			unbootable.  Even if the kernel were updated there
			would be a big problem if an older kernel were to be
			used.

			/etc/autoconfig is known to 'init' and a change to
			'init' at this time (amidst all the other patching)
			was not thought to be a "good idea" at this time.

	The good news is that the update can be done "in place" - it will not
	be necessary to dump and reload the system.  The "bad news" is that
	a "make world" (recompile of the system from sources) is necessary.

	The rebuild is because two pathnames are widely known and/or
	implicitly referenced by *many* programs in the system:

		/etc/zoneinfo is used by the ctime() routine in libc.a and
		there are tens (hundreds?) of programs which call the ctime()
		family of functions.  Because /etc/zoneinfo is moved to 
		/usr/share/zoneinfo any program which references ctime()
		directly or indirectly needs to be relinked.

		The utmp file's pathname /etc/utmp is explicitly referenced
		by many programs in the system and since /etc/utmp is moved
		to /var/run/utmp all programs which read/write the utmp file
		need to be recompiled.

	The manifest is as follows:

	Part    Patch#	Contents
	----	-----	--------
	1	344	Manifest of files.  Introduction/tour.  Instructions. 
			Shell script to perform the relocation of directories.
			Suggested changes to locally modified files in /etc.  
			A 'shar' file containing a new 'whereis' program.

	2	345	Shar archive of all the new Makefiles which are to
			be installed on the system.  This is a separate part
			because it's ~60kb worth of makefiles.
	
	3-8	346-351	Patch files.  Broken into ~64kb pieces.

	Parts 2 thru 8 will not have the following introductory material 
	included.

	Introduction (a mini-tour/summary) 
	============

	[The impatient can skip directly to 'Instructions' below]

	1. What gets moved where?  Lots of stuff ;)  

	   All executables except 'init' and 'autoconfig' are moved from
	   /etc to various system directories.  A number of programs move
	   to /sbin which is still on the root filesystem but most programs
	   are relocated to either /usr/sbin or /usr/libexec and this saves
	   space on the root filesystem which is a good thing for folks with
	   small disks and/or smallish root filesystems (where /tmp frequently
	   has to reside).  My (~8mb) root file system went from 50% full to 
	   38% full after completing the patching and rebuilding.

	   The timezone directory /etc/zoneinfo is moved off the root filesystem
	   and into /usr/share.  A copy of the current timezone's file must
	   be copied into /etc/localtime.

	   Most of the source files moved were single file programs (shutdown
	   consisted only of shutdown.c for example).  These have been moved
	   into subdirectories (/usr/src/sbin/shutdown) and the correspoding
	   man page moved from /usr/src/man/man8 to the program source direc-
	   tory.  New Makefiles are provided (as #345) for those programs.

	2. What nifty scripts and helpful hints are provided to help move
	   all these files around?

	   Included in the shar archive below are a shell script which will
	   do all the file/directory relocation, a patch file to be used 
	   *only* as a guide, and a set of detailed instructions.

		344.sh  - this is the script which uses 'mv', 'rm', 'cp' to
			  rearrange the system.  PLEASE read this over first,
			  if you are uncomfortable with 'rm' or 'mv' being
			  done then change that to 'cp' temporarily.

		344.patch - this is NOT to be used directly unless these
			    files:

				/etc/inetd.conf
				/etc/netstart
				/etc/rc.local
				/etc/ttys
				/usr/adm/daily
				/usr/adm/monthly
				/usr/adm/weekly

			     are identical on your system to the ones on
			     my system.  The 'daily', 'monthly' and 'weekly'
			     patches stand a good chance of being OK but it
			     is highly unlikely that your 'netstart' or 'ttys'
			     file is the same as mine!

			     NOTE:  /etc/rc may also fall into this catagory.

		344.shar - a shar archive of a replacement 'whereis' program
			   ported from 4.4-Lite2.

	     What to watch for?  In /etc/inetd.conf (and any other local
	     config files you might have) change the TCP-Wrapper program
	     from /etc/tcpd to /usr/libexec/tcpd.  In /etc/ttys you will notice
	     that 'getty' moves from /etc to /usr/libexec.

	     Most daemons move to /usr/libexec, the changes to /etc/inetd.conf
	     are mostly substituting "/usr/libexec" for "/etc".  The 344.patch
	     gives good examples.

	     NOTE: If you change /etc/inetd.conf be sure to send a SIGHUP to
		   'inetd' *ONLY* after the executables have been relocated or
		   copied.  If you change /etc/inetd.conf and do not move
		   (for example) /etc/rlogind to /usr/libexec you may find 
		   that you can no longer login over the network.

	Instructions
	============
	As always it is recommended that a current (bootable) backup of the
	system be available just in case something totally unexpected should
	go wrong.

	Another "good idea" is to print out a copy of these instructions for
	reference during the update process.

	The system will need about 30 megabytes of free space in /usr to do
	an unattended "make world".   If there is not that much space free
	it is possible to rebuild the system but it will have to be done in
	stages with periodic "make clean" commands being done.

	Make sure you have all 8 parts (#344 thru 351 inclusive) of this kit.
	Remove the headers and introductory material by cutting where
	indicated in each of the parts.  Save the 8 files in a "safe" place
	(one that is not cleared during a reboot).  In the directions below
	/usr/tmp/{344,345,346,...,351} are used - if you use a different
	directory or set of filenames you will have to substitute the appro-
	priate names.


	And now the moment you've all been waiting for!

		Now is a good time, if you have not already done so, to
		add /sbin, /usr/sbin to your search path in .cshrc, .login or
		.profile

	Unpack the first part to obtain the master rename script, the *LOCAL*
	files that require manual attention, and the new 'whereis' program:

		cd /usr/tmp
		sh 344

	It is recommended that the 'script' program be used when running
	the remaining steps.  That creates a logfile which can be examined
	to find errors or failed patches.

		script logfile1

	Then run the script "344.sh":

		sh 344.sh

	Next unpack the new 'whereis' program:

		sh 344.shar

	and finally exit 'script'.

		exit

	Look at the file 'logfile1' for any failed commands.  There should
	not be any but if there are you'll have to determine if they're warning
	or serious in nature.

	Finally the files:

		/etc/inetd.conf
		/etc/netstart
		/etc/rc.local
		/etc/ttys
		/usr/adm/daily
		/usr/adm/monthly
		/usr/adm/weekly

	require manual attention.  Read CAREFULLY '344.patch'.  If it looks like
	that patch file is OK for your system you can simply run patch with
	"patch -p0 < 344.patch".  Otherwise you have to use 'vi' (or editor
	of your choice) to change those 7 files.   As mentioned elsewhere
	the main changes are to substitute "/usr/libexec" (or /sbin, usr/sbin,
	...) for "/etc".  Use 344.patch as a guide.

	After editing the seven files listed above the 'init' and 'inetd'
	processes are sent a SIGHUP to cause them to reread their config files
	(/etc/ttys and /etc/inetd.conf respectively).

		kill -HUP init-pid inetd-pid

	(where init-pid and inetd.pid are the process IDs of 'init' and 'inetd'
	 as obtained by running "ps -ax")

	     NOTE:  If you are using the tcp wrapper ('tcpd') program it will
		    be necessary to specify the full pathnames of the daemons
		    in /etc/inetd.conf until 'tcpd' is recompiled with a new
		    default location.  Currently 'tcpd' is compiled with
		    /etc as the default directory.  After the updates and
		    patches are applied the default will be /usr/libexec.

	Changing /etc/ttys (with the new pathname for 'getty') and sending 
	'init' a SIGHUP may log you out.  This is normal - just log back in.

	Then the new Makefiles are installed on the system:

		script logfile2
		sh 345
		exit

	Scan 'logfile2' for any files which failed to install.  There
	should not be any since these are all new files.

	The remaining 6 parts are all patches:

	NOTE:  If you have made local changes to /etc/rc then there will be
	       a failed hunk or two of #346 that fails to apply.  The "rc#"
	       will provide clues as to what should be changed: '/etc/update'
	       becomes simply 'update' and so on.

		script logfile3
		patch -p0 <  346
		patch -p0 <  347
		patch -p0 <  348
		patch -p0 <  349
		patch -p0 <  350
		patch -p0 <  351
		exit

	Carefully examine 'logfile3' for any patches which failed to apply.
	If any are found it may be necessary to fix the problem in order to
	prevent compilation or installation later on from failing.

	Then recompile and install only the C and utilities libraries:

		cd /usr/src/lib/libc
		make
		make install
		cd /usr/src/usr.lib/libutil
		make
		make install

	Next the long rebuild of the world is done but without going thru the
	three phase build (make the C library, make the compile, then remake 
	the library):

		cd /usr/src
		make >& /tmp/log.world

	After the build finishes SCAN THE LOG for lines of the form 
	"`all' not remade because of errors".  Those indicate that something
	did not get recompiled.  The problem should be fixed and the
	offending program compiled before proceeding further.

		make install >& /tmp/log.install

	Again, scan the log file for errors before rebooting.

	Then:
		
		/usr/sbin/sendmail -bz
		reboot

		rm -r /etc/zoneinfo
		rm -f /etc/utmp
		rm -f /etc/getty
		rm -f /etc/syslog.pid

	If the timezone from 'date' is wrong then you have to copy the
	correct timezone file from /usr/share/zoneinfo to /etc/localtime.
	For example if you are on the east coast of the US:

		cp /usr/share/zoneinfo/EST5EDT /etc/localtime
		chmod a+r /etc/localtime

	Locally written programs which refer to "/etc/utmp" will need to
	be recompiled. 

	At this time you may, if you desire (I did it on my systems) remove
	the extra "/usr/libexec" prefix uses in /etc/inetd.conf.  The newly
	recompiled 'tcpd' knows to look in /usr/libexec now.  Thus the
	pathname "/usr/libexec/telnetd" can be made simply "telnetd" once
	again.

	A last step to perform cleanup:

		cd /usr/src
		make clean

	To clean up the debris left over from the patching (and after updating
	~300 files there is quite a bit of debris ;-)) you may wish to:

		find / -name '*~' -print > /tmp/tilde
		cat /tmp/tilde | xargs rm

	Congratulations - you're done and have a system reorganized in a
	modern style.

	As always these, and all previous updates to 2.11BSD, are available
	via anonymous FTP to either FTP.IIPO.GTEGSC.COM or MOE.2BSD.COM in
	the directory /pub/2.11BSD.

--------------------#344 Cut here-----------------------
#!/bin/sh
# This is a shell archive (produced by GNU sharutils 4.1).
# To extract the files from this archive, save it to some FILE, remove
# everything before the `!/bin/sh' line above, then type `sh FILE'.
#
# Made on 1996-12-07 22:29 PST by <sms@moe.2bsd.com>.
# Source directory was `/users/sms/KIT'.
#
# Existing files will *not* be overwritten unless `-c' is specified.
# This format requires very little intelligence at unshar time.
# "if test", "echo", and "sed" may be needed.
#
# This shar contains:
# length mode       name
# ------ ---------- ------------------------------------------
#  14644 -rw-r--r-- 344.sh
#   7800 -rw-r--r-- 344.shar
#   8930 -rw-r--r-- 344.patch
#
# ============= 344.sh ==============
if test -f '344.sh' && test X"$1" != X"-c"; then
  echo 'x - skipping 344.sh (file already exists)'
else
  echo 'x - extracting 344.sh (text)'
  sed 's/^X//' << 'SHAR_EOF' > '344.sh' &&
X#!/bin/sh
X
Xumask 22
X# First run the script which installs the new files on the system
X#
X# Then run this script to rename/move files to their new homes
X#
X# Finally apply the patches with 'patch -p0 < patchfile'
X
Xmv /usr/src/etc/tcpd /usr/src/libexec/tcpd
Xmv /etc/tcpd /usr/libexec
X
Xmv /etc/ifconfig /sbin/ifconfig
Xmkdir /usr/src/sbin/ifconfig
Xmv /usr/src/etc/ifconfig.c /usr/src/sbin/ifconfig/ifconfig.c
Xmv /usr/src/man/man8/ifconfig.8 /usr/src/sbin/ifconfig/ifconfig.8
X
Xmv /etc/testnet /sbin/testnet
Xmkdir /usr/src/sbin/testnet
Xmv /usr/src/etc/testnet.c /usr/src/sbin/testnet/testnet.c
X
Xmv /etc/telnetd /usr/libexec/telnetd
Xmkdir /usr/src/libexec/telnetd
Xmv /usr/src/etc/telnetd.c /usr/src/libexec/telnetd/telnetd.c
Xmv /usr/src/man/man8/telnetd.8 /usr/src/libexec/telnetd/telnetd.8
X
Xmv /etc/rshd /usr/libexec/rshd
Xmkdir /usr/src/libexec/rshd
Xmv /usr/src/etc/rshd/pathnames.h /usr/src/libexec/rshd/pathnames.h
Xmv /usr/src/etc/rshd/rshd.8 /usr/src/libexec/rshd/rshd.8
Xmv /usr/src/etc/rshd/rshd.c /usr/src/libexec/rshd/rshd.c
Xrm -r /usr/src/etc/rshd
X
Xmv /etc/rlogind /usr/libexec/rlogind
Xmkdir /usr/src/libexec/rlogind
Xmv /usr/src/etc/rlogind/rlogind.8 /usr/src/libexec/rlogind/rlogind.8
Xmv /usr/src/etc/rlogind/rlogind.c /usr/src/libexec/rlogind/rlogind.c
Xrm -r /usr/src/etc/rlogind
X
Xmv /etc/rexecd /usr/libexec/rexecd
Xmkdir /usr/src/libexec/rexecd
Xmv /usr/src/man/man8/rexecd.8 /usr/src/libexec/rexecd/rexecd.8
Xmv /usr/src/etc/rexecd.c /usr/src/libexec/rexecd/rexecd.c
X
Xmv /etc/fingerd /usr/libexec/fingerd
Xmkdir /usr/src/libexec/fingerd
Xmv /usr/src/etc/fingerd/pathnames.h /usr/src/libexec/fingerd/pathnames.h
Xmv /usr/src/etc/fingerd/fingerd.8 /usr/src/libexec/fingerd/fingerd.8
Xmv /usr/src/etc/fingerd/fingerd.c /usr/src/libexec/fingerd/fingerd.c
Xrm -r /usr/src/etc/fingerd
X
Xmv /etc/tftpd /usr/libexec/tftpd
Xmkdir /usr/src/libexec/tftpd
Xmv /usr/src/etc/tftpd/tftpsubs.c /usr/src/libexec/tftpd/tftpsubs.c
Xmv /usr/src/etc/tftpd/tftpd.8 /usr/src/libexec/tftpd/tftpd.8
Xmv /usr/src/etc/tftpd/tftpd.c /usr/src/libexec/tftpd/tftpd.c
Xrm -r /usr/src/etc/tftpd
X
Xmv /etc/ftpd /usr/libexec/ftpd
Xmkdir /usr/src/libexec/ftpd
Xmv /usr/src/etc/ftpd/ftpcmd.y /usr/src/libexec/ftpd/ftpcmd.y
Xmv /usr/src/etc/ftpd/ftpd.8 /usr/src/libexec/ftpd/ftpd.8
Xmv /usr/src/etc/ftpd/ftpd.c /usr/src/libexec/ftpd/ftpd.c
Xmv /usr/src/etc/ftpd/glob.c /usr/src/libexec/ftpd/glob.c
Xmv /usr/src/etc/ftpd/logwtmp.c /usr/src/libexec/ftpd/logwtmp.c
Xmv /usr/src/etc/ftpd/newvers.sh /usr/src/libexec/ftpd/newvers.sh
Xmv /usr/src/etc/ftpd/pathnames.h /usr/src/libexec/ftpd/pathnames.h
Xmv /usr/src/etc/ftpd/popen.c /usr/src/libexec/ftpd/popen.c
Xmv /usr/src/etc/ftpd/vers.c /usr/src/libexec/ftpd/vers.c
Xmv /usr/src/etc/ftpd/version /usr/src/libexec/ftpd/version
Xrm -r /usr/src/etc/ftpd
X
Xmv /etc/comsat /usr/libexec/comsat
Xmkdir /usr/src/libexec/comsat
Xmv /usr/src/etc/comsat.c /usr/src/libexec/comsat/comsat.c
Xmv /usr/src/man/man8/comsat.8 /usr/src/libexec/comsat/comsat.8
X
Xmv /etc/ntalkd /usr/libexec/ntalkd
Xmkdir /usr/src/libexec/talkd
Xmv /usr/src/etc/talkd/*.c /usr/src/libexec/talkd
Xmv /usr/src/man/man8/talkd.8 /usr/src/libexec/talkd/talkd.8
Xrm -r /usr/src/etc/talkd
X
Xmv /etc/route /sbin/route
Xmkdir /usr/src/sbin/route
Xmv /usr/src/etc/route.c /usr/src/sbin/route/route.c
Xmv /usr/src/man/man8/route.8 /usr/src/sbin/route/route.8
X
Xmv /etc/mkfs /sbin/mkfs
Xmkdir /usr/src/sbin/mkfs
Xmv /usr/src/etc/mkfs.c /usr/src/sbin/mkfs/mkfs.c
Xmv /usr/src/man/man8/mkfs.8 /usr/src/sbin/mkfs/mkfs.8
X
Xmv /usr/src/etc/quotacheck /usr/src/sbin/quotacheck
Xmv /etc/quotacheck /sbin/quotacheck
X
Xmv /etc/quotaon /usr/sbin/quotaon
Xrm /etc/quotaoff
Xln /usr/sbin/quotaon /usr/sbin/quotaoff
Xmkdir /usr/src/usr.sbin/quotaon
Xmv /usr/src/etc/quotaon.c /usr/src/usr.sbin/quotaon/quotaon.c
Xmv /usr/src/man/man8/quotaon.8 /usr/src/usr.sbin/quotaon/quotaon.8
X
Xmv /etc/dev_mkdb /usr/sbin/dev_mkdb
Xmv /usr/src/etc/dev_mkdb /usr/src/usr.sbin/dev_mkdb
X
Xmv /etc/syslogd /usr/sbin/syslogd
Xmkdir /usr/src/usr.sbin/syslogd
Xmv /usr/src/etc/syslogd.c /usr/src/usr.sbin/syslogd/syslogd.c
Xmv /usr/src/man/man8/syslogd.8 /usr/src/usr.sbin/syslogd/syslogd.8
X
Xmv /etc/savecore /sbin/savecore
Xmkdir /usr/src/sbin/savecore
Xmv /usr/src/etc/savecore.c /usr/src/sbin/savecore/savecore.c
Xmv /usr/src/man/man8/savecore.8 /usr/src/sbin/savecore/savecore.8
X
Xmv /etc/update /usr/sbin/update
Xmkdir /usr/src/usr.sbin/update
Xmv /usr/src/etc/update.c /usr/src/usr.sbin/update/update.c
Xmv /usr/src/man/man8/update.8 /usr/src/usr.sbin/update/update.8
X
Xmv /etc/cron /usr/sbin/cron
Xmkdir /usr/src/usr.sbin/cron
Xmv /usr/src/etc/cron.c /usr/src/usr.sbin/cron/cron.c
Xmv /usr/src/man/man8/cron.8 /usr/src/usr.sbin/cron/cron.8
X
Xmv /etc/accton /usr/sbin/accton
Xmkdir /usr/src/usr.sbin/accton
Xmv /usr/src/etc/accton.c /usr/src/usr.sbin/accton/accton.c
X
Xmv /etc/routed /sbin/routed
Xmv /usr/src/etc/routed /usr/src/sbin/routed
X
Xmv /etc/mknod /sbin/mknod
Xmkdir /usr/src/sbin/mknod
Xmv /usr/src/etc/mknod.c /usr/src/sbin/mknod/mknod.c
Xmv /usr/src/man/man8/mknod.8 /usr/src/sbin/mknod/mknod.8
X
Xmv /etc/named /usr/sbin/named
Xmv /usr/src/etc/named /usr/src/usr.sbin/named
X
Xmv /etc/config /usr/sbin/config
Xmv /usr/src/etc/config /usr/src/usr.sbin/config
X
Xcp -p /etc/getty /usr/libexec/getty
Xmv /usr/src/etc/getty /usr/src/libexec/getty
X
Xmv /etc/sa /usr/sbin/sa
Xmkdir /usr/src/usr.sbin/sa
Xmv /usr/src/etc/sa.c /usr/src/usr.sbin/sa/sa.c
Xmv /usr/src/man/man8/sa.8 /usr/src/usr.sbin/sa/sa.8
X
Xmv /etc/catman /usr/sbin/catman
Xmkdir /usr/src/usr.sbin/catman
Xmv /usr/src/etc/catman.c /usr/src/usr.sbin/catman/catman.c
Xmv /usr/src/man/man8/catman.8 /usr/src/usr.sbin/catman/catman.8
X
Xmv /etc/shutdown /sbin/shutdown
Xmkdir /usr/src/sbin/shutdown
Xmv /usr/src/etc/shutdown.c /usr/src/sbin/shutdown/shutdown.c
Xmv /usr/src/man/man8/shutdown.8 /usr/src/sbin/shutdown/shutdown.8
X
Xmv /etc/reboot /sbin/reboot
Xrm /etc/halt /etc/fastboot
Xln /sbin/reboot /sbin/halt
Xln /sbin/reboot /sbin/fastboot
Xmkdir /usr/src/sbin/reboot
Xmv /usr/src/etc/reboot.c /usr/src/sbin/reboot/reboot.c
Xmv /usr/src/man/man8/reboot.8 /usr/src/sbin/reboot/reboot.8
X
Xmv /etc/chroot /usr/sbin/chroot
Xmv /usr/src/etc/chroot /usr/src/usr.sbin/chroot
X
Xmv /usr/src/etc/mkproto.data /usr/src/share/misc/mkproto.data
Xmv /etc/mkproto /usr/sbin/mkproto
Xmkdir /usr/src/usr.sbin/mkproto
Xmv /usr/src/etc/mkproto.c /usr/src/usr.sbin/mkproto/mkproto.c
Xmv /usr/src/man/man8/mkproto.8 /usr/src/usr.sbin/mkproto/mkproto.8
X
Xmv /etc/dump /sbin/dump
Xmv /etc/rdump /sbin/rdump
Xmv /etc/dumpdir /sbin/dumpdir
Xmv /usr/src/etc/dump /usr/src/sbin/dump
X
Xmv /etc/fsck /sbin/fsck
Xmv /usr/src/etc/fsck /usr/src/sbin/fsck
X
Xmv /etc/htable /usr/sbin/htable
Xmv /usr/src/etc/htable /usr/src/usr.sbin/htable
X
Xmv /etc/implog /usr/sbin/implog
Xmkdir /usr/src/usr.sbin/implog
Xmv /usr/src/etc/implog/implog.c /usr/src/usr.sbin/implog/implog.c
Xmv /usr/src/man/man8/implog.8 /usr/src/usr.sbin/implog/implog.8
X
Xmv /etc/implogd /usr/sbin/implogd
Xmkdir /usr/src/usr.sbin/implogd
Xmv /usr/src/etc/implog/implogd.c /usr/src/usr.sbin/implogd/implogd.c
Xmv /usr/src/man/man8/implogd.8 /usr/src/usr.sbin/implogd/implogd.8
Xrm -r /usr/src/etc/implog
X
Xmv /etc/mkpasswd /sbin/mkpasswd
Xmv /usr/src/etc/mkpasswd /usr/src/sbin/mkpasswd
X
Xmv /etc/mount /sbin/mount
Xmv /usr/src/etc/mount /usr/src/sbin/mount
X
Xmv /etc/newfs /sbin/newfs
Xmkdir /usr/src/sbin/newfs
Xmv /usr/src/etc/newfs.c /usr/src/sbin/newfs/newfs.c
Xmv /usr/src/man/man8/newfs.8 /usr/src/sbin/newfs/newfs.8
X
Xmv /etc/ping /bin/ping
Xmv /usr/src/etc/ping /usr/src/bin/ping
X
Xmv /etc/restor /sbin/restor
Xmkdir /usr/src/sbin/restor
Xmv /usr/src/etc/restor/restor.c /usr/src/sbin/restor/restor.c
Xmv /usr/src/man/man8/restor.8 /usr/src/sbin/restor/restor.8
Xrm -r /usr/src/etc/restor
X
Xmv /etc/rwhod /usr/sbin/rwhod
Xmkdir /usr/src/usr.sbin/rwhod
Xmv /usr/src/etc/rwhod.c /usr/src/usr.sbin/rwhod/rwhod.c
Xmv /usr/src/man/man8/rwhod.8 /usr/src/usr.sbin/rwhod/rwhod.8
X
Xmv /etc/timed /usr/sbin/timed
Xmv /etc/timedc /usr/sbin/timedc
Xmv /usr/src/etc/timed /usr/src/usr.sbin/timed
X
Xmv /etc/umount /sbin/umount
Xmv /usr/src/etc/umount /usr/src/sbin/umount
X
Xmv /etc/vipw /usr/sbin/vipw
Xmv /usr/src/etc/vipw /usr/src/usr.sbin/vipw
X
Xmv /usr/src/ucb/tn3270/map3270 /usr/src/share/termcap/map3270
Xmv /etc/map3270 /usr/share/misc/map3270
X
Xmv /etc/ac /usr/sbin/ac
Xmkdir /usr/src/usr.sbin/ac
Xmv /usr/src/etc/ac.c /usr/src/usr.sbin/ac/ac.c
Xmv /usr/src/man/man8/ac.8 /usr/src/usr.sbin/ac/ac.8
X
Xmv /etc/arff /usr/sbin/arff
Xmkdir /usr/src/usr.sbin/arff
Xmv /usr/src/etc/arff.c /usr/src/usr.sbin/arff/arff.c
Xmv /usr/src/man/man8/arff.8 /usr/src/usr.sbin/arff/arff.8
X
Xmv /etc/badsect /sbin/badsect
Xmkdir /usr/src/sbin/badsect
Xmv /usr/src/etc/badsect.c /usr/src/sbin/badsect/badsect.c
Xmv /usr/src/man/man8/badsect.8 /usr/src/sbin/badsect/badsect.8
X
Xmv /etc/chown /usr/sbin/chown
Xmkdir /usr/src/usr.sbin/chown
Xmv /usr/src/etc/chown.c /usr/src/usr.sbin/chown/chown.c
Xmv /usr/src/man/man8/chown.8 /usr/src/usr.sbin/chown/chown.8
X
Xmv /etc/diskpart /usr/sbin/diskpart
Xmkdir /usr/src/usr.sbin/diskpart
Xmv /usr/src/etc/diskpart.c /usr/src/usr.sbin/diskpart/diskpart.c
Xmv /usr/src/man/man8/diskpart.8 /usr/src/usr.sbin/diskpart/diskpart.8
X
Xmv /etc/dmesg /sbin/dmesg
Xmkdir /usr/src/sbin/dmesg
Xmv /usr/src/etc/dmesg.c /usr/src/sbin/dmesg/dmesg.c
Xmv /usr/src/man/man8/dmesg.8 /usr/src/sbin/dmesg/dmesg.8
X
Xmv /etc/gettable /usr/sbin/gettable
Xmkdir /usr/src/usr.sbin/gettable
Xmv /usr/src/etc/gettable.c /usr/src/usr.sbin/gettable/gettable.c
Xmv /usr/src/man/man8/gettable.8 /usr/src/usr.sbin/gettable/gettable.8
X
Xmv /etc/kgmon /usr/sbin/kgmon
Xmkdir /usr/src/usr.sbin/kgmon
Xmv /usr/src/etc/kgmon.c /usr/src/usr.sbin/kgmon/kgmon.c
Xmv /usr/src/man/man8/kgmon.8 /usr/src/usr.sbin/kgmon/kgmon.8
X
Xmv /etc/mkhosts /usr/sbin/mkhosts
Xmkdir /usr/src/usr.sbin/mkhosts
Xmv /usr/src/etc/mkhosts.c /usr/src/usr.sbin/mkhosts/mkhosts.c
Xmv /usr/src/man/man8/mkhosts.8 /usr/src/usr.sbin/mkhosts/mkhosts.8
X
Xmv /etc/mklost+found /usr/sbin/mklost+found
Xmkdir /usr/src/usr.sbin/mklost+found
Xmv /usr/src/etc/mklost+found.sh /usr/src/usr.sbin/mklost+found/mklost+found.sh
Xmv /usr/src/man/man8/mklost+found.8 /usr/src/usr.sbin/mklost+found/mklost+found.8
X
Xmv /etc/pstat /usr/sbin/pstat
Xmkdir /usr/src/usr.sbin/pstat
Xmv /usr/src/etc/pstat.c /usr/src/usr.sbin/pstat/pstat.c
Xmv /usr/src/man/man8/pstat.8 /usr/src/usr.sbin/pstat/pstat.8
X
Xmv /etc/renice /usr/bin/renice
Xmkdir /usr/src/usr.bin/renice
Xmv /usr/src/etc/renice.c /usr/src/usr.bin/renice/renice.c
Xmv /usr/src/man/man8/renice.8 /usr/src/usr.bin/renice/renice.8
X
Xmv /etc/rmt /usr/sbin/rmt
Xmkdir /usr/src/usr.sbin/rmt
Xmv /usr/src/etc/rmt.c /usr/src/usr.sbin/rmt/rmt.c
Xmv /usr/src/man/man8/rmt.8 /usr/src/usr.sbin/rmt/rmt.8
X
Xmv /etc/rxformat /usr/sbin/rxformat
Xmkdir /usr/src/usr.sbin/rxformat
Xmv /usr/src/etc/rxformat.c /usr/src/usr.sbin/rxformat/rxformat.c
Xmv /usr/src/man/man8/rxformat.8 /usr/src/usr.sbin/rxformat/rxformat.8
X
Xmv /etc/slattach /sbin/slattach
Xmkdir /usr/src/sbin/slattach
Xmv /usr/src/etc/slattach.c /usr/src/sbin/slattach/slattach.c
Xmv /usr/src/man/man8/slattach.8 /usr/src/sbin/slattach/slattach.8
X
Xmv /etc/swapon /sbin/swapon
Xmkdir /usr/src/sbin/swapon
Xmv /usr/src/etc/swapon.c /usr/src/sbin/swapon/swapon.c
Xmv /usr/src/man/man8/swapon.8 /usr/src/sbin/swapon/swapon.8
X
Xmv /etc/tunefs /sbin/tunefs
Xmkdir /usr/src/sbin/tunefs
Xmv /usr/src/etc/tunefs.c /usr/src/sbin/tunefs/tunefs.c
Xmv /usr/src/man/man8/tunefs.8 /usr/src/sbin/tunefs/tunefs.8
X
Xmv /etc/ntpd /usr/sbin/ntpd
Xmv /etc/ntp /usr/sbin/ntp
Xmv /etc/ntpdc /usr/sbin/ntpdc
Xmv /usr/src/new/ntp /usr/src/usr.sbin/ntp
Xmv /usr/new/man/cat8/ntp.0 /usr/man/cat8/ntp.0
Xmv /usr/new/man/cat8/ntpd.0 /usr/man/cat8/ntpd.0
Xmv /usr/new/man/cat8/ntpdc.0 /usr/man/cat8/ntpdc.0
X
Xmv /etc/traceroute /usr/sbin/traceroute
Xmv /usr/src/new/traceroute /usr/src/usr.sbin/traceroute
Xmv /usr/new/man/cat8/traceroute.0 /usr/man/cat8/traceroute.0
X
Xmv /etc/quot /usr/sbin/quot
Xmkdir /usr/src/usr.sbin/quot
Xmv /usr/src/etc/quot.c /usr/src/usr.sbin/quot/quot.c
Xmv /usr/src/man/man8/quot.8 /usr/src/usr.sbin/quot/quot.8
X
Xmv /etc/bad144 /usr/sbin/bad144
Xmkdir /usr/src/usr.sbin/bad144
Xmv /usr/src/etc/bad144.c /usr/src/usr.sbin/bad144/bad144.c
Xmv /usr/src/man/man8/bad144.8 /usr/src/usr.sbin/bad144/bad144.8
X
Xmv /etc/repquota /usr/sbin/repquota
Xmkdir /usr/src/usr.sbin/repquota
Xmv /usr/src/etc/repquota.c /usr/src/usr.sbin/repquota/repquota.c
Xmv /usr/src/man/man8/repquota.8 /usr/src/usr.sbin/repquota/repquota.8
X
Xmv /etc/edquota /usr/sbin/edquota
Xmkdir /usr/src/usr.sbin/edquota
Xmv /usr/src/etc/edquota.c /usr/src/usr.sbin/edquota/edquota.c
Xmv /usr/src/man/man8/edquota.8 /usr/src/usr.sbin/edquota/edquota.8
X
Xmv /etc/fstat /usr/bin/fstat
Xmkdir /usr/src/usr.bin/fstat
Xmv /usr/src/etc/fstat.c /usr/src/usr.bin/fstat/fstat.c
Xmv /usr/src/man/man8/fstat.8 /usr/src/usr.bin/fstat/fstat.8
X
Xmv /etc/arp /usr/sbin/arp
Xmkdir /usr/src/usr.sbin/arp
Xmv /usr/src/etc/arp.c /usr/src/usr.sbin/arp/arp.c
Xmv /usr/src/man/man8/arp.8 /usr/src/usr.sbin/arp/arp.8
X
Xmv /etc/flcopy /usr/sbin/flcopy
Xmkdir /usr/src/usr.sbin/flcopy
Xmv /usr/src/etc/flcopy.c /usr/src/usr.sbin/flcopy/flcopy.c
X
Xmv /etc/trpt /usr/sbin/trpt
Xmkdir /usr/src/usr.sbin/trpt
Xmv /usr/src/etc/trpt.c /usr/src/usr.sbin/trpt/trpt.c
Xmv /usr/src/man/man8/trpt.8 /usr/src/usr.sbin/trpt/trpt.8
X
Xmv /etc/dumpfs /sbin/dumpfs
Xmkdir /usr/src/sbin/dumpfs
Xmv /usr/src/etc/dumpfs.c /usr/src/sbin/dumpfs/dumpfs.c
Xmv /usr/src/man/man8/dumpfs.8 /usr/src/sbin/dumpfs/dumpfs.8
X
Xmkdir /usr/src/usr.sbin/trsp
Xmv /usr/src/etc/trsp.c /usr/src/usr.sbin/trsp/trsp.c
Xmv /usr/src/man/man8/trsp.8 /usr/src/usr.sbin/trsp/trsp.8
X
Xmv /etc/clri /sbin/clri
Xmkdir /usr/src/sbin/clri
Xmv /usr/src/etc/clri.c /usr/src/sbin/clri/clri.c
Xmv /usr/src/man/man8/clri.8 /usr/src/sbin/clri/clri.8
X
Xmv /etc/icheck /sbin/icheck
Xmkdir /usr/src/sbin/icheck
Xmv /usr/src/etc/icheck.c /usr/src/sbin/icheck/icheck.c
Xmv /usr/src/man/man8/icheck.8 /usr/src/sbin/icheck/icheck.8
X
Xmv /etc/dcheck /sbin/dcheck
Xmkdir /usr/src/sbin/dcheck
Xmv /usr/src/etc/dcheck.c /usr/src/sbin/dcheck/dcheck.c
Xmv /usr/src/man/man8/dcheck.8 /usr/src/sbin/dcheck/dcheck.8
X
Xmv /etc/ncheck /sbin/ncheck
Xmkdir /usr/src/sbin/ncheck
Xmv /usr/src/etc/ncheck.c /usr/src/sbin/ncheck/ncheck.c
Xmv /usr/src/man/man8/ncheck.8 /usr/src/sbin/ncheck/ncheck.8
X
Xrm -f /usr/src/etc/MANIFEST
X
Xmv /usr/src/etc/PORT /usr/src/usr.sbin/PORT
X
Xmv /usr/src/local/popper /usr/src/libexec/popper
Xmv /usr/local/man/cat8/popper.0 /usr/man/cat8/popper.0
Xmv /usr/local/popper /usr/libexec/popper
X
Xmv /usr/ucb/whereis /usr/bin/whereis
Xrm /usr/src/ucb/whereis.c /usr/src/man/man1/whereis.1
X
Xmv /usr/src/usr.bin/uucp/acucntrl.8c /usr/src/usr.bin/uucp/acucntrl.8
X
Xcp -p /etc/zoneinfo/localtime /etc/localtime
Xchmod a+r /etc/localtime
X
Xmv /usr/src/etc/tzone /usr/src/share/zoneinfo
Xmkdir /usr/share/zoneinfo
Xchmod a+r,a+x /usr/share/zoneinfo
X
Xtouch /var/run/utmp
Xchmod a+r /var/run/utmp
SHAR_EOF
  : || echo 'restore of 344.sh failed'
fi
# ============= 344.shar ==============
if test -f '344.shar' && test X"$1" != X"-c"; then
  echo 'x - skipping 344.shar (file already exists)'
else
  echo 'x - extracting 344.shar (text)'
  sed 's/^X//' << 'SHAR_EOF' > '344.shar' &&
X#! /bin/sh
X# This is a shell archive, meaning:
X# 1. Remove everything above the #! /bin/sh line.
X# 2. Save the resulting text in a file.
X# 3. Execute the file with /bin/sh (not csh) to create:
X#	/usr/src/usr.bin/whereis
X# This archive created: Thu Dec  5 20:25:04 1996
Xexport PATH; PATH=/bin:/usr/bin:$PATH
Xif test ! -d '/usr/src/usr.bin/whereis'
Xthen
X	mkdir '/usr/src/usr.bin/whereis'
Xfi
Xcd '/usr/src/usr.bin/whereis'
Xif test -f 'whereis.1'
Xthen
X	echo shar: "will not over-write existing file 'whereis.1'"
Xelse
Xsed 's/^Y//' << \SHAR_EOF > 'whereis.1'
XY.\" Copyright (c) 1993
XY.\"	The Regents of the University of California.  All rights reserved.
XY.\"
XY.\" Redistribution and use in source and binary forms, with or without
XY.\" modification, are permitted provided that the following conditions
XY.\" are met:
XY.\" 1. Redistributions of source code must retain the above copyright
XY.\"    notice, this list of conditions and the following disclaimer.
XY.\" 2. Redistributions in binary form must reproduce the above copyright
XY.\"    notice, this list of conditions and the following disclaimer in the
XY.\"    documentation and/or other materials provided with the distribution.
XY.\" 3. All advertising materials mentioning features or use of this software
XY.\"    must display the following acknowledgement:
XY.\"	This product includes software developed by the University of
XY.\"	California, Berkeley and its contributors.
XY.\" 4. Neither the name of the University nor the names of its contributors
XY.\"    may be used to endorse or promote products derived from this software
XY.\"    without specific prior written permission.
XY.\"
XY.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
XY.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
XY.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
XY.\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
XY.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
XY.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
XY.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
XY.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
XY.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
XY.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
XY.\" SUCH DAMAGE.
XY.\"
XY.\"	@(#)whereis.1	8.2.1 (2.11BSD) 1996/11/27
XY.\"
XY.TH WHEREIS 1 "November 27, 1996"
XY.UC 3
XY.SH NAME
XYwhereis \- locate programs
XY.SH SYNOPSIS
XY.B whereis
XYprogram ...
XY.SH DESCRIPTION
XYThe
XY.I whereis
XYutility checks the standard binary directories for the specified programs,
XYprinting out the paths of any it finds.
XY.PP
XYThe path searched is the string returned by the
XY.IR sysctl (8)
XYutility for the
XY``user.cs_path''
XYstring.
XY.SH SEE ALSO
XY.IR sysctl (8),
XY.SH COMPATIBILITY
XYThe historic flags and arguments for the
XY.I whereis
XYutility are no longer available in this version.
XY.SH HISTORY
XYThe
XY.I whereis
XYcommand appeared in 3.0BSD.
XSHAR_EOF
Xchmod 644 'whereis.1'
Xfi
Xif test -f 'whereis.c'
Xthen
X	echo shar: "will not over-write existing file 'whereis.c'"
Xelse
Xsed 's/^Y//' << \SHAR_EOF > 'whereis.c'
XY/*-
XY * Copyright (c) 1993
XY *	The Regents of the University of California.  All rights reserved.
XY *
XY * Redistribution and use in source and binary forms, with or without
XY * modification, are permitted provided that the following conditions
XY * are met:
XY * 1. Redistributions of source code must retain the above copyright
XY *    notice, this list of conditions and the following disclaimer.
XY * 2. Redistributions in binary form must reproduce the above copyright
XY *    notice, this list of conditions and the following disclaimer in the
XY *    documentation and/or other materials provided with the distribution.
XY * 3. All advertising materials mentioning features or use of this software
XY *    must display the following acknowledgement:
XY *	This product includes software developed by the University of
XY *	California, Berkeley and its contributors.
XY * 4. Neither the name of the University nor the names of its contributors
XY *    may be used to endorse or promote products derived from this software
XY *    without specific prior written permission.
XY *
XY * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
XY * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
XY * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
XY * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
XY * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
XY * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
XY * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
XY * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
XY * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
XY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
XY * SUCH DAMAGE.
XY */
XY
XY#if	!defined(lint) && defined(DOSCCS)
XYstatic char copyright[] =
XY"@(#) Copyright (c) 1993\n\
XY	The Regents of the University of California.  All rights reserved.\n";
XY
XYstatic char sccsid[] = "@(#)whereis.c	8.1.1 (2.11BSD) 1996";
XY#endif
XY
XY#include <sys/param.h>
XY#include <sys/stat.h>
XY#include <sys/sysctl.h>
XY
XY#include <errno.h>
XY#include <stdio.h>
XY#include <stdlib.h>
XY#include <string.h>
XY
XYvoid usage();
XY
XYint
XYmain(argc, argv)
XY	int argc;
XY	char *argv[];
XY{
XY	struct stat sb;
XY	size_t len;
XY	int ch, sverrno, mib[2];
XY	char *p, *t, *std, path[MAXPATHLEN];
XY
XY	while ((ch = getopt(argc, argv, "")) != EOF)
XY		switch (ch) {
XY		case '?':
XY		default:
XY			usage();
XY		}
XY	argc -= optind;
XY	argv += optind;
XY
XY	/* Retrieve the standard path. */
XY	mib[0] = CTL_USER;
XY	mib[1] = USER_CS_PATH;
XY	if (sysctl(mib, 2, NULL, &len, NULL, 0) == -1)
XY		return (-1);
XY	if (len == 0) {
XY		err(1, "user_cs_path: sysctl: zero length\n");
XY		/* NOTREACHED */
XY	}
XY	if ((std = (char *)malloc(len)) == NULL) {
XY		err(1, NULL);
XY		/* NOTREACHED */
XY	}
XY	if (sysctl(mib, 2, std, &len, NULL, 0) == -1) {
XY		sverrno = errno;
XY		free(std);
XY		errno = sverrno;
XY		err(1, "sysctl: user_cs_path");
XY		/* NOTREACHED */
XY	}
XY
XY	/* For each path, for each program... */
XY	for (; *argv; ++argv)
XY		for (p = std;; *p++ = ':') {
XY			t = p;
XY			if ((p = strchr(p, ':')) != NULL) {
XY				*p = '\0';
XY				if (t == p)
XY					t = ".";
XY			} else
XY				if (strlen(t) == 0)
XY					t = ".";
XY			(void)sprintf(path, "%s/%s", t, *argv);
XY			if (!stat(path, &sb))
XY				(void)printf("%s\n", path);
XY			if (p == NULL)
XY				break;
XY		}
XY}
XY
XYvoid
XYusage()
XY{
XY	(void)fprintf(stderr, "whereis: program ...\n");
XY	exit (1);
XY}
XSHAR_EOF
Xchmod 644 'whereis.c'
Xfi
Xif test -f 'Makefile'
Xthen
X	echo shar: "will not over-write existing file 'Makefile'"
Xelse
Xsed 's/^Y//' << \SHAR_EOF > 'Makefile'
XY#
XY# Public Domain.  1996/11/16 - Steven Schultz
XY#
XY#	@(#)Makefile	1.0 (2.11BSD) 1996/11/16
XY#
XYCFLAGS=	 -O
XYSEPFLAG= -i
XYSRCS=	whereis.c
XYOBJS=	whereis.o
XYMAN=	whereis.0
XYMANSRC=	whereis.1
XY
XYall: whereis whereis.0
XY
XYwhereis: ${OBJS}
XY	${CC} ${CFLAGS} ${SEPFLAG} -o $@ ${OBJS}
XY
XYwhereis.0: ${MANSRC}
XY	/usr/man/manroff ${MANSRC} > ${MAN}
XY
XYclean:
XY	rm -f ${OBJS} ${MAN} whereis tags 
XY
XYdepend: ${SRCS}
XY	mkdep ${CFLAGS} ${SRCS}
XY
XYinstall: whereis
XY	install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1
XY	install -s -o root -g bin -m 755 whereis ${DESTDIR}/usr/bin/whereis
XY
XYlint: ${SRCS}
XY	lint -hax ${SRCS}
XY
XYtags: ${SRCS}
XY	ctags ${SRCS}
XY# DO NOT DELETE THIS LINE -- mkdep uses it.
XY# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
XSHAR_EOF
Xchmod 644 'Makefile'
Xfi
Xchmod 755 .
Xcd ..
Xexit 0
X#	End of shell archive
SHAR_EOF
  : || echo 'restore of 344.shar failed'
fi
# ============= 344.patch ==============
if test -f '344.patch' && test X"$1" != X"-c"; then
  echo 'x - skipping 344.patch (file already exists)'
else
  echo 'x - extracting 344.patch (text)'
  sed 's/^X//' << 'SHAR_EOF' > '344.patch' &&
X*** /etc/inetd.conf.old	Thu Nov 14 20:22:30 1996
X--- /etc/inetd.conf	Sat Nov 16 13:45:31 1996
X***************
X*** 1,18 ****
X  #
X  # Internet server configuration database
X  #
X! ftp	stream	tcp	nowait	root	/etc/tcpd	ftpd -l
X! telnet	stream	tcp	nowait	root	/etc/tcpd	telnetd
X! shell	stream	tcp	nowait	root	/etc/tcpd	rshd
X! login	stream	tcp	nowait	root	/etc/tcpd	rlogind
X! #exec	stream	tcp	nowait	root	/etc/rexecd	rexecd
X  uucpd	stream	tcp	nowait	root	/usr/libexec/uucpd	uucpd
X! #nntp	stream	tcp	nowait	usenet	/etc/nntpd	nntpd
X! finger	stream	tcp	nowait	nobody	/etc/fingerd	fingerd -s -l
X! tftp	dgram	udp	wait	nobody	/etc/tcpd	tftpd
X! comsat	dgram	udp	wait	root	/etc/comsat	comsat
X! #talk	dgram	udp	wait	root	/etc/talkd	talkd
X! #ntalk   dgram   udp     wait    root    /etc/ntalkd     ntalkd
X  echo	stream	tcp	nowait	root	internal
X  discard	stream	tcp	nowait	root	internal
X  #chargen	stream	tcp	nowait	root	internal
X--- 1,18 ----
X  #
X  # Internet server configuration database
X  #
X! ftp	stream	tcp	nowait	root	/usr/libexec/tcpd	/usr/libexec/ftpd -l
X! telnet	stream	tcp	nowait	root	/usr/libexec/tcpd	/usr/libexec/telnetd
X! shell	stream	tcp	nowait	root	/usr/libexec/tcpd	/usr/libexec/rshd
X! login	stream	tcp	nowait	root	/usr/libexec/tcpd	/usr/libexec/rlogind
X! #exec	stream	tcp	nowait	root	/usr/libexec/rexecd	rexecd
X  uucpd	stream	tcp	nowait	root	/usr/libexec/uucpd	uucpd
X! #nntp	stream	tcp	nowait	usenet	/usr/libexec/nntpd	nntpd
X! finger	stream	tcp	nowait	nobody	/usr/libexec/fingerd	fingerd -s -l
X! tftp	dgram	udp	wait	nobody	/usr/libexec/tcpd	/usr/libexec/tftpd
X! comsat	dgram	udp	wait	root	/usr/libexec/comsat	comsat
X! #talk	dgram	udp	wait	root	/usr/libexec/talkd	talkd
X! #ntalk   dgram   udp     wait    root    /usr/libexec/ntalkd     ntalkd
X  echo	stream	tcp	nowait	root	internal
X  discard	stream	tcp	nowait	root	internal
X  #chargen	stream	tcp	nowait	root	internal
X*** /etc/netstart.old	Thu Jan 18 21:45:25 1996
X--- /etc/netstart	Sat Nov 16 14:04:17 1996
X***************
X*** 1,8 ****
X  #!/bin/sh -
X  
X! #	@(#)netstart	5.2 (Berkeley) 7/16/88
X  
X! INET=`/etc/testnet`
X  if [ $INET = YES ]; then
X  	echo Assuming NETWORKING system ...		>/dev/console 2>&1
X  else
X--- 1,8 ----
X  #!/bin/sh -
X  
X! #	@(#)netstart	5.2.1 (2.11BSD) 1996/11/16
X  
X! INET=`testnet`
X  if [ $INET = YES ]; then
X  	echo Assuming NETWORKING system ...		>/dev/console 2>&1
X  else
X***************
X*** 32,46 ****
X  hostid $hostname					>/dev/console 2>&1
X  
X  if [ $INET = YES ]; then
X! 	# /etc/ifconfig imp0 inet netmask $netmask $hostname broadcast $broadcast up -trailers >/dev/console 2>&1
X! 	# /etc/ifconfig en0 inet netmask $netmask $hostname broadcast $broadcast up -trailers >/dev/console 2>&1
X! 	# /etc/ifconfig ec0 inet netmask $netmask $hostname broadcast $broadcast up -trailers arp >/dev/console 2>&1
X! 	# /etc/ifconfig il0 inet netmask $netmask $hostname broadcast $broadcast up -trailers >/dev/console 2>&1
X! 	/etc/ifconfig qe0 inet netmask $netmask $hostname broadcast $broadcast up -trailers >/dev/console 2>&1
X! 	# /etc/ifconfig sl0 inet 192.254.254.2 192.254.254.1 -arp -trailers >/dev/console 2>&1
X! 	# /etc/slattach /dev/ttyS6 9600
X! 	/etc/ifconfig lo0 inet localhost up -trailers	>/dev/console 2>&1
X  
X! 	/etc/route add $hostname localhost 0		>/dev/console 2>&1
X! 	/etc/route add default $default 1		>/dev/console 2>&1
X  fi
X--- 32,46 ----
X  hostid $hostname					>/dev/console 2>&1
X  
X  if [ $INET = YES ]; then
X! 	# ifconfig imp0 inet netmask $netmask $hostname broadcast $broadcast up -trailers >/dev/console 2>&1
X! 	# ifconfig en0 inet netmask $netmask $hostname broadcast $broadcast up -trailers >/dev/console 2>&1
X! 	# ifconfig ec0 inet netmask $netmask $hostname broadcast $broadcast up -trailers arp >/dev/console 2>&1
X! 	# ifconfig il0 inet netmask $netmask $hostname broadcast $broadcast up -trailers >/dev/console 2>&1
X! 	ifconfig qe0 inet netmask $netmask $hostname broadcast $broadcast up -trailers >/dev/console 2>&1
X! 	# ifconfig sl0 inet 192.254.254.2 192.254.254.1 -arp -trailers >/dev/console 2>&1
X! 	# slattach /dev/ttyS6 9600
X! 	ifconfig lo0 inet localhost up -trailers	>/dev/console 2>&1
X  
X! 	route add $hostname localhost 0		>/dev/console 2>&1
X! 	route add default $default 1		>/dev/console 2>&1
X  fi
X*** /etc/rc.local.old	Mon Oct 21 19:41:03 1996
X--- /etc/rc.local	Sat Nov 16 16:23:44 1996
X***************
X*** 7,13 ****
X  chmod 666 /etc/motd
X  
X  echo -n			starting local daemons:			>/dev/console 2>&1
X! #if [ $INET = YES -a -f /etc/timed ]; then
X  #	timed &				echo -n ' timed'	>/dev/console 2>&1
X  #fi
X  if [ -f /usr/sbin/sendmail ]; then
X--- 7,13 ----
X  chmod 666 /etc/motd
X  
X  echo -n			starting local daemons:			>/dev/console 2>&1
X! #if [ $INET = YES -a -f /usr/sbin/timed ]; then
X  #	timed &				echo -n ' timed'	>/dev/console 2>&1
X  #fi
X  if [ -f /usr/sbin/sendmail ]; then
X***************
X*** 19,25 ****
X  	fi
X  fi
X  				echo '.'			>/dev/console 2>&1
X! /etc/ntpd
X  if [ -f /lonex/etc/rc.lonex ]; then
X  	/lonex/etc/rc.lonex
X  fi
X--- 19,26 ----
X  	fi
X  fi
X  				echo '.'			>/dev/console 2>&1
X! 
X! ntpd
X  if [ -f /lonex/etc/rc.lonex ]; then
X  	/lonex/etc/rc.lonex
X  fi
X*** /etc/ttys.old	Fri Aug 20 23:28:35 1993
X--- /etc/ttys	Sat Nov 16 16:28:19 1996
X***************
X*** 1,16 ****
X  #
X  # name	getty			type		status		comments
X  #
X! console	"/etc/getty std.9600"	vt100		on secure	#special
X! ttyS0	"/etc/getty std.9600"	vt100		on secure
X! ttyS1	"/etc/getty std.9600"	vt100		on secure
X! ttyS2	"/etc/getty std.9600"	vt100		on secure
X! ttyS3	"/etc/getty std.9600"	vt100		on secure
X! ttyS4	"/etc/getty std.9600"	vt100		on secure
X! ttyS5	"/etc/getty std.9600"	vt100		off secure	#printer
X! ttyS6	"/etc/getty std.9600"	vt100		off secure
X! ttyS7	"/etc/getty std.9600"	vt100		off secure
X! ttyl1	"/etc/getty std.9600"	vt100		on secure
X  ttyp0   none                    network         secure
X  ttyp1   none                    network		secure
X  ttyp2   none                    network		secure
X--- 1,16 ----
X  #
X  # name	getty			type		status		comments
X  #
X! console	"/usr/libexec/getty std.9600"	vt100		on secure	#special
X! ttyS0	"/usr/libexec/getty std.9600"	vt100		on secure
X! ttyS1	"/usr/libexec/getty std.9600"	vt100		on secure
X! ttyS2	"/usr/libexec/getty std.9600"	vt100		on secure
X! ttyS3	"/usr/libexec/getty std.9600"	vt100		on secure
X! ttyS4	"/usr/libexec/getty std.9600"	vt100		on secure
X! ttyS5	"/usr/libexec/getty std.9600"	vt100		off secure	#printer
X! ttyS6	"/usr/libexec/getty std.9600"	vt100		off secure
X! ttyS7	"/usr/libexec/getty std.9600"	vt100		off secure
X! ttyl1	"/usr/libexec/getty std.9600"	vt100		on secure
X  ttyp0   none                    network         secure
X  ttyp1   none                    network		secure
X  ttyp2   none                    network		secure
X*** /usr/adm/daily.old	Fri Oct 25 21:23:44 1996
X--- /usr/adm/daily	Sat Nov 16 16:48:41 1996
X***************
X*** 1,5 ****
X  #! /bin/sh -
X! PATH=/usr/local:/usr/ucb:/bin:/usr/bin:/etc
X  echo "Subject: daily run output"
X  echo ""
X  msgs -c
X--- 1,5 ----
X  #! /bin/sh -
X! PATH=/usr/sbin:/usr/local:/usr/ucb:/bin:/usr/bin
X  echo "Subject: daily run output"
X  echo ""
X  msgs -c
X***************
X*** 6,12 ****
X  
X  echo ""
X  echo "Purging accounting records:"
X! /etc/sa -sfv10 > /dev/null
X  
X  echo ""
X  echo "Running calendar:"
X--- 6,12 ----
X  
X  echo ""
X  echo "Purging accounting records:"
X! sa -sfv10 > /dev/null
X  
X  echo ""
X  echo "Running calendar:"
X***************
X*** 57,63 ****
X  cp /dev/null debuglog
X  chmod 644    debuglog
X  
X! kill -1 `cat /etc/syslog.pid`
X  cd /
X  
X  echo ""
X--- 57,63 ----
X  cp /dev/null debuglog
X  chmod 644    debuglog
X  
X! kill -1 `cat /var/run/syslog.pid`
X  cd /
X  
X  echo ""
X*** /usr/adm/monthly.old	Mon Jul 18 11:33:48 1988
X--- /usr/adm/monthly	Sat Nov 16 16:50:55 1996
X***************
X*** 1,10 ****
X  #! /bin/sh -
X! PATH=/usr/local:/usr/ucb:/bin:/usr/bin:/etc
X  echo "Subject: monthly run output"
X  
X  echo ""
X  echo "Doing login accounting:"
X! /etc/ac -p | sort -nr +1
X  
X  echo ""
X  echo "Rotating wtmp file:"
X--- 1,10 ----
X  #! /bin/sh -
X! PATH=/usr/sbin:/usr/local:/usr/ucb:/bin:/usr/bin
X  echo "Subject: monthly run output"
X  
X  echo ""
X  echo "Doing login accounting:"
X! ac -p | sort -nr +1
X  
X  echo ""
X  echo "Rotating wtmp file:"
X*** /usr/adm/weekly.old	Fri Oct 25 21:24:16 1996
X--- /usr/adm/weekly	Sat Nov 16 16:50:27 1996
X***************
X*** 1,5 ****
X  #! /bin/sh -
X! PATH=/usr/local:/usr/ucb:/bin:/usr/bin:/etc
X  echo "Subject: weekly run output"
X  
X  #echo ""
X--- 1,5 ----
X  #! /bin/sh -
X! PATH=/usr/sbin:/usr/local:/usr/ucb:/bin:/usr/bin
X  echo "Subject: weekly run output"
X  
X  #echo ""
X***************
X*** 21,32 ****
X  mv messages   messages.0
X  cp /dev/null  messages
X  chmod 644 messages
X! kill -1 `cat /etc/syslog.pid`
X  cd /
X  
X  echo ""
X  echo "Rebuilding catman:"
X! /etc/catman
X  
X  echo ""
X  echo "Rebuilding find database:"
X--- 21,32 ----
X  mv messages   messages.0
X  cp /dev/null  messages
X  chmod 644 messages
X! kill -1 `cat /var/run/syslog.pid`
X  cd /
X  
X  echo ""
X  echo "Rebuilding catman:"
X! catman
X  
X  echo ""
X  echo "Rebuilding find database:"
SHAR_EOF
  : || echo 'restore of 344.patch failed'
fi
exit 0