--- anaconda-7.3/fermi/post.sh	Wed Dec 31 18:00:00 1969
+++ anaconda-7.3-f1/fermi/post.sh	Wed Jul 10 15:24:40 2002
@@ -0,0 +1,134 @@
+VERSION=731
+SECUREFTPSERVER=linux1.fnal.gov
+#
+CHROOT="/mnt/sysimage/"
+RUN="$CHROOT/usr/sbin/chroot /mnt/sysimage/"
+INSTALLIMAGE="/mnt/source/"
+PATH=$PATH:/$CHROOT/bin:/$CHROOT/usr/bin:/$CHROOT/sbin:/$CHROOT/usr/sbin
+if [ -s $CHROOT/tmp/upgrade.log ] ; then
+   METHOD=UPGRADE
+else
+   METHOD=INSTALL
+fi
+mount | grep -q  7xtest
+if [ $? -eq 0 ] ; then
+  RELEASE=7xtest
+else
+  mount | grep -q 73rolling
+  if [ $? -eq 0 ] ; then
+	RELEASE=73rolling
+  else
+  RELEASE=$VERSION
+  fi
+fi
+echo $RELEASE > /dev/tty5
+mount | grep -q nfs 
+if [ $? -ne 0 ] ; then
+  MEDIA=CDROM
+else
+  MEDIA=NFS
+fi
+export CHROOT
+export RUN
+export INSTALLIMAGE
+export PATH
+export METHOD
+echo "Installing Post Install RPMS" >/dev/tty5
+echo "Log file in /tmp/postinstall.log" >/dev/tty5
+
+
+$RUN /sbin/chkconfig --list ypbind | grep -q on
+if [ $? = 0 ] ; then
+   $RUN /sbin/chkconfig --level 2345 portmap on
+else
+   $RUN /sbin/chkconfig --level 2345 portmap off
+fi
+#
+# Determine which workgroup we are
+if [ -s $CHROOT/etc/workgroup ]; then
+   WORKGROUP=`cat $CHROOT/etc/workgroup`
+else
+   WORKGROUP=`cat  $CHROOT/etc/workgroup`
+   echo $WORKGROUP >/dev/tty5
+   echo "CUSTOM" > $CHROOT/etc/workgroup
+   WORKGROUP=`cat  $CHROOT/etc/workgroup`
+fi
+
+echo "Fermi Linux $RELEASE $METHOD for $WORKGROUP via $MEDIA on `$RUN /bin/date`" > /tmp/banner
+grep -q "NOTICE TO USERS" $CHROOT/etc/motd
+if [ $? -ne 0 ] ; then
+   cat $CHROOT/etc/motd $INSTALLIMAGE/Fermi/common/configfiles/fermibanner > /tmp/fermibanner
+   cp /tmp/fermibanner $CHROOT/etc/motd
+fi
+if [ -s $CHROOT/etc/motd.rpmsave ] ; then
+   grep "Fermi " $CHROOT/etc/motd.rpmsave > /tmp/fermilinux
+   cat /tmp/banner /tmp/fermilinux | uniq > /tmp/bannerlinux
+   cp /tmp/bannerlinux /tmp/banner
+fi
+cat /tmp/banner $CHROOT/etc/motd > /tmp/tmpbanner
+cp /tmp/banner $CHROOT/etc/FermiLinuxHistory
+$CHROOT/bin/cp /tmp/tmpbanner $CHROOT/etc/motd
+
+# go and copy all of the $WORKGROUP/* files from $INSTALLIMAGE which is
+# either NFS or the CDROM
+mkdir  $CHROOT/etc/$WORKGROUP >> /$CHROOT/tmp/postinstall.log 2>&1
+mkdir  $CHROOT/etc/$WORKGROUP/RPMS >> /$CHROOT/tmp/postinstall.log 2>&1
+cd $CHROOT/etc/$WORKGROUP
+
+# Go get the DONOTEXPORT workgroup rpms
+
+if [ -d /$INSTALLIMAGE/DONOTEXPORT/workgroups/$WORKGROUP/RPMS ] ; then
+   $CHROOT/bin/cp -L /$INSTALLIMAGE/DONOTEXPORT/workgroups/$WORKGROUP/RPMS/*.rpm RPMS/ >> /dev/null 2>&1
+else
+   $CHROOT/usr/bin/ncftpget -T $SECUREFTPSERVER ${CHROOT}etc/$WORKGROUP/RPMS/ /linux/$RELEASE/i386/DONOTEXPORT/workgroups/$WORKGROUP/RPMS/*.rpm >> $CHROOT/tmp/postinstall.log 2>&1
+fi
+
+# Go get the rest of the workgroup rpms
+
+if [ -d /$INSTALLIMAGE/Fermi/workgroups/$WORKGROUP/RPMS ] ; then
+  $CHROOT/bin/cp -RL /$INSTALLIMAGE/Fermi/workgroups/$WORKGROUP/* . >> /$CHROOT/tmp/postinstall.log 2>&1
+else
+   $CHROOT/usr/bin/ncftpget -T $SECUREFTPSERVER ${CHROOT}etc/$WORKGROUP/RPMS/ /linux/$RELEASE/i386/workgroups/$WORKGROUP/RPMS/*.rpm >> $CHROOT/tmp/postinstall.log 2>&1
+   $CHROOT/usr/bin/ncftpget -T $SECUREFTPSERVER ${CHROOT}etc/$WORKGROUP/configfiles/ /linux/$RELEASE/i386/workgroups/$WORKGROUP/configfiles/* >> $CHROOT/tmp/postinstall.log 2>&1
+   $CHROOT/usr/bin/ncftpget -T $SECUREFTPSERVER ${CHROOT}etc/$WORKGROUP/scripts/ /linux/$RELEASE/i386/workgroups/$WORKGROUP/scripts/* >> $CHROOT/tmp/postinstall.log 2>&1
+fi
+
+
+# Now we run the before.rpms.sh script
+# then install all the rpms
+# Then the after.rpms.nochroot.sh and the after.rpms.sh script
+# and finally the final.after.rpms.sh script
+
+cd $CHROOT
+if [ -x $CHROOT/etc/$WORKGROUP/scripts/before.rpms.sh ] ; then
+   ($RUN /etc/$WORKGROUP/scripts/before.rpms.sh  > $CHROOT/etc/$WORKGROUP/before.rpms.log 2>&1 )
+fi
+cd $CHROOT
+ls etc/$WORKGROUP/RPMS/*.rpm > $CHROOT/tmp/rpmfiles 2> /dev/null
+if [ -s $CHROOT/tmp/rpmfiles ] ; then
+   cd $CHROOT/etc/$WORKGROUP/RPMS
+   /$CHROOT/bin/rpm --root $CHROOT -U --force --nodeps *.rpm  >& $CHROOT/etc/$WORKGROUP/workgroup.rpm.log
+fi
+cd $CHROOT
+if [ -d $CHROOT/etc/$WORKGROUP/RPMSI ] ; then
+   ls $CHROOT/etc/$WORKGROUP/RPMSI/*.rpm > $CHROOT/tmp/rpmfiles.i 2> /dev/null
+   if [ -s $CHROOT/tmp/rpmfiles.i ] ; then
+      cd $CHROOT/etc/$WORKGROUP/RPMSI
+     /$CHROOT/bin/rpm --root $CHROOT -i --force --nodeps *.rpm  >> $CHROOT/etc/$WORKGROUP/workgroup.rpm.log 2>&1
+   fi
+fi  
+$CHROOT/bin/touch $CHROOT/etc/$WORKGROUP/after.rpms.log
+if [ -x $CHROOT/etc/$WORKGROUP/scripts/after.rpms.nochroot.sh ] ; then
+   $CHROOT/etc/$WORKGROUP/scripts/after.rpms.nochroot.sh  >> $CHROOT/etc/$WORKGROUP/after.rpms.log 2>&1
+else
+   echo "No after.rpms.nochroot.sh found" >> $CHROOT/tmp/after.rpms.log 2>&1
+fi
+if [ -x $CHROOT/etc/$WORKGROUP/scripts/after.rpms.sh ] ; then
+   ($RUN /etc/$WORKGROUP/scripts/after.rpms.sh  >> $CHROOT/etc/$WORKGROUP/after.rpms.log 2>&1 )
+else
+   echo "No after.rpms.sh found" >> $CHROOT/tmp/after.rpms.log 2>&1
+fi
+cd $CHROOT
+if [ -x $CHROOT/etc/$WORKGROUP/scripts/final.after.rpms.sh ] ; then
+   ($RUN /etc/$WORKGROUP/scripts/final.after.rpms.sh  > $CHROOT/etc/$WORKGROUP/final.after.rpms.log 2>&1 )
+fi
