( cd boot ; rm -rf vmlinuz-rt )
( cd boot ; ln -sf vmlinuz-2.6.33.7.2-rt30 vmlinuz-rt )
( cd boot ; rm -rf System.map-rt )
( cd boot ; ln -sf System.map-2.6.33.7.2-rt30 System.map-rt )
( cd boot ; rm -rf config-rt )
( cd boot ; ln -sf config-2.6.33.7.2-rt30 config-rt )
( cd lib/modules/2.6.33.7.2-rt30 ; rm -rf build )
( cd lib/modules/2.6.33.7.2-rt30 ; ln -sf ../../../usr/src/linux-2.6.33.7.2-rt30 build )
( cd usr/src/linux-2.6.33.7.2-rt30/include/linux ; rm -rf config.h )
( cd usr/src/linux-2.6.33.7.2-rt30/include/linux ; ln -sf autoconf.h config.h )
( cd usr/src/linux-2.6.33.7.2-rt30/include ; rm -rf asm-x86 )
( cd usr/src/linux-2.6.33.7.2-rt30/include ; ln -sf ../arch/x86/include/asm asm-x86 )
( cd usr/src/linux-2.6.33.7.2-rt30/include ; rm -rf asm )
( cd usr/src/linux-2.6.33.7.2-rt30/include ; ln -sf ../arch/x86/include/asm asm )
( cd usr/src/linux-2.6.33.7.2-rt30/arch ; rm -rf i386 )
( cd usr/src/linux-2.6.33.7.2-rt30/arch ; ln -sf x86 i386 )

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.modules.new

