config() {
  NEW="$1"
  OLD="`dirname $NEW`/`basename $NEW .new`"
  # If there's no config file by that name, mv it over:
  if [ ! -r $OLD ]; then
    mv $NEW $OLD
  elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then # toss the redundant copy
    rm $NEW
  fi
  # Otherwise, we leave the .new copy for the admin to consider...
}

config etc/nsswitch.conf.new
config etc/nsswitch.conf-nis.new
config etc/netgroup.new
config etc/yp.conf.new
config etc/rc.d/rc.yp.new
config var/yp/nicknames.new
config var/yp/ypmake.conf.new
config var/yp/Makefile.new
config var/yp/securenets.new
rm -f etc/nsswitch.conf.new etc/nsswitch.conf-nis.new etc/netgroup.new etc/yp.conf.new var/yp/nicknames.new var/yp/ypmake.conf.new var/yp/Makefile.new var/yp/securenets.new etc/nsswitch.conf.new
( cd usr/bin ; rm -rf ypchfn )
( cd usr/bin ; ln -sf yppasswd ypchfn )
( cd usr/bin ; rm -rf ypchsh )
( cd usr/bin ; ln -sf yppasswd ypchsh )
