check () {
 owner=$1;perms=$2;shift 2;/bin/chown $owner $*;/bin/chmod $perms $*; }

link () {
 suff=$1;org=$2;shift 2;for i in $*;do \
	/bin/ln -f usr/man/cat$suff/$org.$suff.z usr/man/cat$suff/$i.$suff.z;done; }

check root.bin 751 root
check user.users 711 home/user
check adm.adm 751 usr/adm
check bin.info 775 usr/man/cat?
check bin.bin 555 . bin etc etc/lilo home usr usr/bin usr/lib usr/lib/locate \
 usr/include usr/local usr/local/bin usr/local/lib usr/local/man usr/man \
 usr/man/man? usr/spool usr/src
check bin.bin 1777 usr/preserve
echo "Compressing formatted man pages"
for i in usr/man/cat*/*;do
	if [ -f $i.Z -o -f $i.z ];then /bin/rm -f $i.[Zz];fi;done
/usr/bin/gzip -f9S .z usr/man/cat*/*[^zZ]
link 1 bash sh
link 1 ls dir ll lsf vdir
link 1 compress uncompress
link 1 elvis ex vi
link 1 elvrec virec
link 1 grep egrep fgrep
link 1 gzip gunzip zcat
link 1 uuencode uudecode
link 1 zdiff zcmp
link 8 halt reboot
link 8 init telinit
link 8 rdev ramsize rootflags vidmode
/bin/rmdir -p backupdirs/etc/lilo 2>/dev/null
