#!/bin/sh
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/rc.udev.new
config etc/modprobe.d/blacklist.new
config etc/modprobe.d/isapnp.new
( cd lib/udev/devices ; rm -rf fd )
( cd lib/udev/devices ; ln -sf /proc/self/fd fd )
( cd lib/udev/devices ; rm -rf core )
( cd lib/udev/devices ; ln -sf /proc/kcore core )
( cd lib/udev/devices ; rm -rf stdin )
( cd lib/udev/devices ; ln -sf /proc/self/fd/0 stdin )
( cd lib/udev/devices ; rm -rf stderr )
( cd lib/udev/devices ; ln -sf /proc/self/fd/2 stderr )
( cd lib/udev/devices ; rm -rf stdout )
( cd lib/udev/devices ; ln -sf /proc/self/fd/1 stdout )
( cd usr/man/man8 ; rm -rf udevcontrol.8.gz )
( cd usr/man/man8 ; ln -sf udevd.8.gz udevcontrol.8.gz )
( cd lib64 ; rm -rf libvolume_id.so.0.69 )
( cd lib64 ; ln -sf libvolume_id.so.0.69.0 libvolume_id.so.0.69 )
( cd lib64 ; rm -rf libvolume_id.so.0 )
( cd lib64 ; ln -sf libvolume_id.so.0.69.0 libvolume_id.so.0 )
( cd lib64 ; rm -rf libvolume_id.so )
( cd lib64 ; ln -sf libvolume_id.so.0.69.0 libvolume_id.so )
