summarylogtreecommitdiffstats
path: root/crda.install
blob: e64e401a956ca85651de51bd286a57c69b0e0a84 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
## arg 1:  the new package version
post_install() {
  echo "Uncomment the right regulatory domain in /etc/conf.d/wireless-regdom."
  echo "It will automatically be set when necessary."
}

## arg 1:  the new package version
## arg 2:  the old package version
post_upgrade() {
  # In an upgrade from 1.0.1-1 or older, the wireless-regdom file moves from the crda package
  # to the new wireless-regdb package. If the user changed the file, it is save to overwrite the one
  # from wireless-regdb by the user-defined one
  if [ $(vercmp $2 1.0.1-2) -lt 0 -a -f /etc/conf.d/wireless-regdom.pacorig -a -n "$(grep -v ^# /etc/conf.d/wireless-regdom.pacorig | grep -v ^$)" ]; then
    mv /etc/conf.d/wireless-regdom.pacorig /etc/conf.d/wireless-regdom
  fi
}