#!/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/dracut.conf.d/elogind.conf.new
( cd usr/lib/dracut ; rm -rf dracut-functions )
( cd usr/lib/dracut ; ln -sf dracut-functions.sh dracut-functions )
( cd usr/man/man7 ; rm -rf dracut.kernel.7.gz )
( cd usr/man/man7 ; ln -sf dracut.cmdline.7.gz dracut.kernel.7.gz )
