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/rc.d/init.d/iwpmd.new
config etc/rc.d/init.d/ibacm.new
config etc/rc.d/init.d/srpd.new
config etc/srp_daemon.conf.new
config etc/infiniband-diags/error_thresholds.new
config etc/infiniband-diags/ibdiag.conf.new
config etc/rdma/modules/opa.conf.new
config etc/rdma/modules/iwarp.conf.new
config etc/rdma/modules/srp_daemon.conf.new
config etc/rdma/modules/infiniband.conf.new
config etc/rdma/modules/iwpmd.conf.new
config etc/rdma/modules/rdma.conf.new
config etc/rdma/modules/roce.conf.new
config etc/modprobe.d/truescale.conf.new
config etc/modprobe.d/mlx4.conf.new
config etc/udev/rules.d/70-persistent-ipoib.rules.new
config etc/iwpmd.conf.new

( cd usr/lib64 ; rm -rf libmlx5.so )
( cd usr/lib64 ; ln -sf libmlx5.so.1 libmlx5.so )
( cd usr/lib64 ; rm -rf libibmad.so )
( cd usr/lib64 ; ln -sf libibmad.so.5 libibmad.so )
( cd usr/lib64 ; rm -rf libmlx4.so )
( cd usr/lib64 ; ln -sf libmlx4.so.1 libmlx4.so )
( cd usr/lib64 ; rm -rf librdmacm.so )
( cd usr/lib64 ; ln -sf librdmacm.so.1 librdmacm.so )
( cd usr/lib64 ; rm -rf libefa.so )
( cd usr/lib64 ; ln -sf libefa.so.1 libefa.so )
( cd usr/lib64 ; rm -rf libibnetdisc.so )
( cd usr/lib64 ; ln -sf libibnetdisc.so.5 libibnetdisc.so )
( cd usr/lib64/libibverbs ; rm -rf libmlx5-rdmav25.so )
( cd usr/lib64/libibverbs ; ln -sf ../libmlx5.so.1.11.25.0 libmlx5-rdmav25.so )
( cd usr/lib64/libibverbs ; rm -rf libefa-rdmav25.so )
( cd usr/lib64/libibverbs ; ln -sf ../libefa.so.1.0.25.0 libefa-rdmav25.so )
( cd usr/lib64/libibverbs ; rm -rf libmlx4-rdmav25.so )
( cd usr/lib64/libibverbs ; ln -sf ../libmlx4.so.1.0.25.0 libmlx4-rdmav25.so )
( cd usr/lib64 ; rm -rf librdmacm.so.1 )
( cd usr/lib64 ; ln -sf librdmacm.so.1.2.25.0 librdmacm.so.1 )
( cd usr/lib64 ; rm -rf libibumad.so )
( cd usr/lib64 ; ln -sf libibumad.so.3 libibumad.so )
( cd usr/lib64 ; rm -rf libibverbs.so )
( cd usr/lib64 ; ln -sf libibverbs.so.1 libibverbs.so )
( cd usr/lib64 ; rm -rf libefa.so.1 )
( cd usr/lib64 ; ln -sf libefa.so.1.0.25.0 libefa.so.1 )
( cd usr/lib64 ; rm -rf libibmad.so.5 )
( cd usr/lib64 ; ln -sf libibmad.so.5.3.25.0 libibmad.so.5 )
( cd usr/lib64 ; rm -rf libibverbs.so.1 )
( cd usr/lib64 ; ln -sf libibverbs.so.1.7.25.0 libibverbs.so.1 )
( cd usr/lib64 ; rm -rf libmlx4.so.1 )
( cd usr/lib64 ; ln -sf libmlx4.so.1.0.25.0 libmlx4.so.1 )
( cd usr/lib64 ; rm -rf libibnetdisc.so.5 )
( cd usr/lib64 ; ln -sf libibnetdisc.so.5.0.25.0 libibnetdisc.so.5 )
( cd usr/lib64 ; rm -rf libibumad.so.3 )
( cd usr/lib64 ; ln -sf libibumad.so.3.0.25.0 libibumad.so.3 )
( cd usr/lib64/rsocket ; rm -rf librspreload.so.1.0.0 )
( cd usr/lib64/rsocket ; ln -sf librspreload.so librspreload.so.1.0.0 )
( cd usr/lib64/rsocket ; rm -rf librspreload.so.1 )
( cd usr/lib64/rsocket ; ln -sf librspreload.so librspreload.so.1 )
( cd usr/lib64 ; rm -rf libmlx5.so.1 )
( cd usr/lib64 ; ln -sf libmlx5.so.1.11.25.0 libmlx5.so.1 )
( cd usr/sbin ; rm -rf run_srp_daemon )
( cd usr/sbin ; ln -sf srp_daemon run_srp_daemon )
( cd usr/sbin ; rm -rf ibsrpdm )
( cd usr/sbin ; ln -sf srp_daemon ibsrpdm )
( cd usr/man/man3 ; rm -rf ibnd_debug.3.gz )
( cd usr/man/man3 ; ln -sf ibnd_discover_fabric.3.gz ibnd_debug.3.gz )
( cd usr/man/man3 ; rm -rf ibnd_find_node_dr.3.gz )
( cd usr/man/man3 ; ln -sf ibnd_find_node_guid.3.gz ibnd_find_node_dr.3.gz )
( cd usr/man/man3 ; rm -rf ibnd_show_progress.3.gz )
( cd usr/man/man3 ; ln -sf ibnd_discover_fabric.3.gz ibnd_show_progress.3.gz )
( cd usr/man/man3 ; rm -rf ibnd_iter_nodes_type.3.gz )
( cd usr/man/man3 ; ln -sf ibnd_iter_nodes.3.gz ibnd_iter_nodes_type.3.gz )
( cd usr/man/man3 ; rm -rf ibnd_set_max_smps_on_wire.3.gz )
( cd usr/man/man3 ; ln -sf ibnd_discover_fabric.3.gz ibnd_set_max_smps_on_wire.3.gz )
( cd usr/man/man3 ; rm -rf ibnd_destroy_fabric.3.gz )
( cd usr/man/man3 ; ln -sf ibnd_discover_fabric.3.gz ibnd_destroy_fabric.3.gz )
