
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/brltty.conf.new
config etc/rc.d/rc.brltty.new
if ! grep -wq brltty /etc/rc.d/rc.S; then
  sed -i '/# Mount Control Groups filesystem interface:/ i \
# Start brltty ASAP so that the user gets all further messages on the\
# braille terminal\
if [ -x /etc/rc.d/rc.brltty ];then\
  sleep 3\
  /etc/rc.d/rc.brltty start\
fi\
' /etc/rc.d/rc.S
fi
