[Debian-eeepc-commits] [SCM] Maintenance of eeepc-acpi-scripts debian package branch, rfkill, updated. 1.1.1-17-gaf84054
Darren Salt
linux at youmustbejoking.demon.co.uk
Sat Jul 25 14:15:31 UTC 2009
The following commit has been merged in the rfkill branch:
commit af84054754809fee9d22c314c09971d2b7774f20
Author: Darren Salt <linux at youmustbejoking.demon.co.uk>
Date: Sat Jul 25 15:13:50 2009 +0100
Use & depend on rfkill.
diff --git a/debian/control b/debian/control
index 70d02f4..5ee59bc 100644
--- a/debian/control
+++ b/debian/control
@@ -13,7 +13,7 @@ Vcs-Browser: http://git.debian.org/?p=debian-eeepc/eeepc-acpi-scripts.git
Package: eeepc-acpi-scripts
Architecture: all
Conflicts: acpi-support
-Depends: acpid (>= 1.0.4), acpi-support-base, pm-utils
+Depends: acpid (>= 1.0.4), acpi-support-base, pm-utils, rfkill
Recommends: alsa-utils
Suggests: aosd-cat, ttf-dejavu | ttf-bitstream-vera | ttf-freefont
| gsfonts-x11 | ttf-mscorefonts-installer | ttf-liberation,
diff --git a/functions.sh b/functions.sh
index d2b0dee..aaef7f3 100644
--- a/functions.sh
+++ b/functions.sh
@@ -38,15 +38,33 @@ have_dev_rfkill()
[ -c /dev/rfkill ]
}
-get_rfkill()
-{
- cat "$1"
-}
+if have_dev_rfkill; then
+ get_rfkill()
+ {
+ # simple yes/no, so...
+ expr length "$(rfkill list | sed -e '/bluetooth:/! d; N; s/.*://')" - 2
+ }
-set_rfkill()
-{
- echo "$2" > "$1"
-}
+ set_rfkill()
+ {
+ if [ "$2" = 0 ]; then
+ rfkill block bluetooth
+ else
+ rfkill unblock bluetooth
+ fi
+ }
+else
+ # we have no /dev/rfkill
+ get_rfkill()
+ {
+ cat "$1"
+ }
+
+ set_rfkill()
+ {
+ echo "$2" > "$1"
+ }
+fi
detect_x_display()
{
--
Maintenance of eeepc-acpi-scripts debian package
More information about the Debian-eeepc-commits
mailing list