#!/bin/sh

for file in `find ./bin ./lib ./usr -type f -print` 
do
  destfileorig=`echo $file | sed 's/\.//'`
  fsum=`sum $destfileorig | awk '{ printf( "%s", $1 ) }' `
  destfilebackup=$destfileorig.pre-y2k.$fsum
  if [ -x $destfileorig ] ; then
    echo "$destfileorig exists, rename to $destfilebackup"
    /sbin/mv $destfileorig $destfilebackup
    /sbin/cp $destfilebackup $destfileorig
  fi
done

/sbin/find bin -type f -print | /sbin/cpio -pmvud /
/sbin/find lib -type f -print | /sbin/cpio -pmvud /
/sbin/find usr -type f -print | /sbin/cpio -pmvud /
/sbin/sync
/sbin/sync
/sbin/echo "This host $hostname needs a reboot NOW!!!!!"
/sbin/echo "Its libraries are now updated, so confusion may reign until"
/sbin/echo "you run /sbin/init 6 to tidy it up." 

