# Check if afs is running.  If so turn off xntpd as afs does its own time sync
/sbin/chkconfig --list afs | grep on
if [ $? -eq 0 ] ; then
	/sbin/chkconfig --level 345 xntpd off
	echo "Turned off xntpd because afs is running" >>/etc/$WORKGROUP/after.rpms.log
fi
# Added to enable nfs
/sbin/chkconfig --level 345 nfs on
/sbin/chkconfig --level 345 autofs on
/sbin/chkconfig --level 345 nfslock on
/sbin/chkconfig --level 345 telnet on
/sbin/chkconfig --level 345 ftp on
/sbin/chkconfig --level 345 kshell on

# Edit the config.ps for the latex
#   so that it uses standard 8.5 x 11 size as the default
cd /usr/share/texmf/dvips/config/

csplit -f dvips config.ps /"@ A4size 210mm 297mm"/
csplit -f dvipsagain dvips01 /"@ letterSize 8.5in 11in"/
csplit -f dvipsyetagain dvipsagain01 2

cat dvipsyetagain00 >> dvips00
cat dvipsagain00 >> dvips00
cat dvipsyetagain01 >> dvips00

mv -f dvips00 config.ps
rm -f dvipsyetagain00 dvipsyetagain01 dvipsagain00 dvipsagain01
rm -f dvips01


#make KDE the default desktop
rm -rf /etc/sysconfig/desktop
touch /etc/sysconfig/desktop
echo 'DESKTOP = "KDE"' >> /etc/sysconfig/desktop
echo '"startkde"' > /root/.xsession

cd /d
ln -s /data/algol algol
ln -s /data/achernar achernar
ln -s /data/cassio  cassio
ln -s /data/deneb  deneb
ln -s /data/fiesco  fiesco
ln -s /data/germont germont
ln -s /data/hal hal
ln -s /data/indus indus
ln -s /data/libra libra
ln -s /data/leonora leonora
ln -s /data/lupus lupus
ln -s /data/lynx  lynx
ln -s /data/pisces pisces
ln -s /data/rigel rigel
ln -s /data/sculptor sculptor
ln -s /data/scratch1 scratch1
ln -s /data/scratch2 scratch2
ln -s /data/scratch3 scratch3
ln -s /data/scratch4 scratch4
ln -s /data/scratch5 scratch5
ln -s /data/scratch6 scratch6
ln -s /data/scratch7 scratch7
ln -s /data/scratch8 scratch8
ln -s /data/scratch9 scratch9
ln -s /data/scratch10 scratch10
ln -s /data/scratch11 scratch11
ln -s /data/scratch12 scratch12
ln -s /data/scratch13 scratch13

touch /root/.k5login
echo "host/nabucco.fnal.gov@FNAL.GOV" >> /root/.k5login
echo "brew@FNAL.GOV" >> /root/.k5login
echo "jlkaiser@FNAL.GOV" >> /root/.k5login
echo "kschu@FNAL.GOV" >> /root/.k5login
echo "lisa@FNAL.GOV" >> /root/.k5login
echo "merina@FNAL.GOV" >> /root/.k5login
echo "mgreaney@FNAL.GOV" >> /root/.k5login
echo "shepelak@FNAL.GOV" >> /root/.k5login
echo "timm@FNAL.GOV" >> /root/.k5login
echo "stan@FNAL.GOV" >> /root/.k5login
echo "ormes@FNAL.GOV" >> /root/.k5login
echo "stebbins@FNAL.GOV" >> /root/.k5login

chmod 600 /root/.k5login

echo "sshdfwd-X11: ALL" >> /etc/hosts.allow
echo "sshd: ALL" >> /etc/hosts.allow 
echo "telnetd: ALL" >> /etc/hosts.allow 

cp /etc/Astro/configfiles/sendmail.cf /etc/sendmail.cf
chown root /etc/sendmail.cf

. /local/ups/etc/setups.sh
setup ups
setup upd
upd install syscollect
ups declare -c syscollect -z /local/ups/db

echo "/usr/local/bin/tcsh" >> /etc/shells
