doinst.sh 575 B

123456789101112131415161718192021
  1. config() {
  2. NEW="$1"
  3. OLD="$(dirname $NEW)/$(basename $NEW .new)"
  4. # If there's no config file by that name, mv it over:
  5. if [ ! -r $OLD ]; then
  6. mv $NEW $OLD
  7. elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
  8. # toss the redundant copy
  9. rm $NEW
  10. fi
  11. # Otherwise, we leave the .new copy for the admin to consider...
  12. }
  13. config etc/ax25/ax25.profile.new
  14. config etc/ax25/rxecho.conf.new
  15. config etc/ax25/nrbroadcast.new
  16. config etc/ax25/ttylinkd.conf.new
  17. config etc/ax25/ax25d.conf.new
  18. config etc/ax25/rip98d.conf.new
  19. config etc/ax25/axspawn.conf.new