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/libva.conf.new
( cd usr/lib64 ; rm -rf libva-drm.so )
( cd usr/lib64 ; ln -sf libva-drm.so.2 libva-drm.so )
( cd usr/lib64 ; rm -rf libva-drm.so.2 )
( cd usr/lib64 ; ln -sf libva-drm.so.2.2000.0 libva-drm.so.2 )
( cd usr/lib64 ; rm -rf libva-glx.so )
( cd usr/lib64 ; ln -sf libva-glx.so.2 libva-glx.so )
( cd usr/lib64 ; rm -rf libva-glx.so.2 )
( cd usr/lib64 ; ln -sf libva-glx.so.2.2000.0 libva-glx.so.2 )
( cd usr/lib64 ; rm -rf libva-wayland.so )
( cd usr/lib64 ; ln -sf libva-wayland.so.2 libva-wayland.so )
( cd usr/lib64 ; rm -rf libva-wayland.so.2 )
( cd usr/lib64 ; ln -sf libva-wayland.so.2.2000.0 libva-wayland.so.2 )
( cd usr/lib64 ; rm -rf libva-x11.so )
( cd usr/lib64 ; ln -sf libva-x11.so.2 libva-x11.so )
( cd usr/lib64 ; rm -rf libva-x11.so.2 )
( cd usr/lib64 ; ln -sf libva-x11.so.2.2000.0 libva-x11.so.2 )
( cd usr/lib64 ; rm -rf libva.so )
( cd usr/lib64 ; ln -sf libva.so.2 libva.so )
( cd usr/lib64 ; rm -rf libva.so.2 )
( cd usr/lib64 ; ln -sf libva.so.2.2000.0 libva.so.2 )
