summaryrefslogtreecommitdiff
path: root/ham/ax25-apps/doinst.sh
blob: 9517f47edd332b659e39fa3d1d0a00ca0da2a947 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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/ax25/ax25ipd.conf.new
config etc/ax25/ax25mond.conf.new
config etc/ax25/ax25rtd.conf.new