summaryrefslogtreecommitdiff
path: root/staging/crda/crda.install
diff options
context:
space:
mode:
authorroot <root@rshg054.dnsready.net>2012-02-10 23:15:14 +0000
committerroot <root@rshg054.dnsready.net>2012-02-10 23:15:14 +0000
commit9d1489b877a1fa7c2674cf1f744804db42d93bfc (patch)
tree33f1f96e0a8a2cc9a6a2939dfa0517a2ea47dcce /staging/crda/crda.install
parent4bc61018eec54dbe50e7556ce01d2ef2859b2c9f (diff)
Fri Feb 10 23:15:14 UTC 2012
Diffstat (limited to 'staging/crda/crda.install')
-rw-r--r--staging/crda/crda.install18
1 files changed, 18 insertions, 0 deletions
diff --git a/staging/crda/crda.install b/staging/crda/crda.install
new file mode 100644
index 000000000..c18e15f71
--- /dev/null
+++ b/staging/crda/crda.install
@@ -0,0 +1,18 @@
+## 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 ]; then
+ if [ -f /etc/conf.d/wireless-regdom.pacorig -a -n "$(grep -v ^# /etc/conf.d/wireless-regdom.pacorig 2>/dev/null | grep -v ^$)" ]; then
+ mv /etc/conf.d/wireless-regdom.pacorig /etc/conf.d/wireless-regdom
+ fi
+ fi
+}