summaryrefslogtreecommitdiffstats
path: root/abs/extra/crda/crda.install
diff options
context:
space:
mode:
authorCecil <knoppmyth@gmail.com>2011-07-09 10:03:45 (GMT)
committerCecil <knoppmyth@gmail.com>2011-07-09 10:03:45 (GMT)
commit15ab16433eb5abfe24d588f02b07c4f9158265ec (patch)
treeb442e8c509cfe5abd06431ad46699776137409d4 /abs/extra/crda/crda.install
parent93b4b04e0bd9adee7a78f1bf27ae4e2b2aba3293 (diff)
downloadlinhes_pkgbuild-15ab16433eb5abfe24d588f02b07c4f9158265ec.zip
linhes_pkgbuild-15ab16433eb5abfe24d588f02b07c4f9158265ec.tar.gz
linhes_pkgbuild-15ab16433eb5abfe24d588f02b07c4f9158265ec.tar.bz2
crda:Bumped to latest.
Diffstat (limited to 'abs/extra/crda/crda.install')
-rw-r--r--abs/extra/crda/crda.install18
1 files changed, 18 insertions, 0 deletions
diff --git a/abs/extra/crda/crda.install b/abs/extra/crda/crda.install
new file mode 100644
index 0000000..c18e15f
--- /dev/null
+++ b/abs/extra/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
+}