[arch-commits] Commit in rfkill/trunk (4 files)

Thomas Bächler thomas at archlinux.org
Sat Jan 9 11:28:11 EST 2010


    Date: Saturday, January 9, 2010 @ 11:28:10
  Author: thomas
Revision: 62473

Original commit of rfkill package

- Moved from community
- Added udev rule for /dev/rfkill
- Added init script

Added:
  rfkill/trunk/60-rfkill.rules
  rfkill/trunk/PKGBUILD
  rfkill/trunk/rfkill.conf.d
  rfkill/trunk/rfkill.rc.d

-----------------+
 60-rfkill.rules |    1 +
 PKGBUILD        |   33 +++++++++++++++++++++++++++++++++
 rfkill.conf.d   |   20 ++++++++++++++++++++
 rfkill.rc.d     |   38 ++++++++++++++++++++++++++++++++++++++
 4 files changed, 92 insertions(+)

Added: 60-rfkill.rules
===================================================================
--- 60-rfkill.rules	                        (rev 0)
+++ 60-rfkill.rules	2010-01-09 16:28:10 UTC (rev 62473)
@@ -0,0 +1 @@
+KERNEL=="rfkill", GROUP="rfkill", MODE="0664"

Added: PKGBUILD
===================================================================
--- PKGBUILD	                        (rev 0)
+++ PKGBUILD	2010-01-09 16:28:10 UTC (rev 62473)
@@ -0,0 +1,33 @@
+# $Id$
+# Maintainer: Thomas Bächler <thomas at archlinux.org>
+
+pkgname=rfkill
+pkgver=0.3
+pkgrel=2
+pkgdesc="Tool to query and set the rfkill state of wireless devices"
+arch=('i686' 'x86_64')
+url="http://linuxwireless.org/en/users/Documentation/rfkill"
+license=('custom')
+depends=('glibc' 'filesystem>=2010.01')
+source=(http://wireless.kernel.org/download/${pkgname}/${pkgname}-${pkgver}.tar.bz2
+        60-rfkill.rules
+        rfkill.conf.d
+        rfkill.rc.d)
+md5sums=('f4d693c2a3e5f0503a3cde3d84be8919'
+         '63f9bf9264911242e430867a41e8918c'
+         '398e7cadf023e05e3e0c323aa33575b9'
+         '16aa78f4b259e79a4b83c6df0b94f926')
+
+build() {
+  cd "${srcdir}/${pkgname}-${pkgver}"
+
+  make || return 1
+  make DESTDIR="${pkgdir}" install || return 1
+  # License
+  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" || return 1
+  # Udev rule
+  install -Dm644 "${srcdir}/60-rfkill.rules" "${pkgdir}/lib/udev/rules.d/60-rfkill.rules" || return 1
+  # Init script
+  install -Dm644 "${srcdir}/rfkill.conf.d" "${pkgdir}/etc/conf.d/rfkill" || return 1
+  install -Dm755 "${srcdir}/rfkill.rc.d" "${pkgdir}/etc/rc.d/rfkill" || return 1
+}


Property changes on: rfkill/trunk/PKGBUILD
___________________________________________________________________
Added: svn:keywords
   + Id

Added: rfkill.conf.d
===================================================================
--- rfkill.conf.d	                        (rev 0)
+++ rfkill.conf.d	2010-01-09 16:28:10 UTC (rev 62473)
@@ -0,0 +1,20 @@
+#
+# /etc/conf.d/rfkill
+# Configuration for the rfkill startup script
+#
+
+# List of devices to block on startup (space-separated)
+RFKILL_BLOCK=""
+
+# List of devices to unblock on startup (space-separated)
+RFKILL_UNBLOCK="all"
+
+# Supported device names are: all, wifi, bluetooth, umb, wimax, wwan, gps and specific device names like phy0, hci0, ...
+# See "rfkill list" for available devices
+# Examples:
+#
+# Block all bluetooth devices:
+# RFKILL_BLOCK="bluetooth"
+#
+# Unblock the phy0 wifi device and all wwan devices:
+# RFKILL_UNBLOCK="phy0 wwan"

Added: rfkill.rc.d
===================================================================
--- rfkill.rc.d	                        (rev 0)
+++ rfkill.rc.d	2010-01-09 16:28:10 UTC (rev 62473)
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/conf.d/rfkill
+
+case "$1" in
+  start)
+    for device in ${RFKILL_BLOCK}; do
+      stat_busy "Blocking rfkill device: ${device}"
+      /usr/bin/rfkill block ${device}
+      if [ $? -eq 0 ]; then
+        stat_done
+      else
+        stat_fail
+      fi
+    done
+    for device in ${RFKILL_UNBLOCK}; do
+      stat_busy "Unblocking rfkill device: ${device}"
+      /usr/bin/rfkill unblock ${device}
+      if [ $? -eq 0 ]; then
+        stat_done
+      else
+        stat_fail
+      fi
+    done
+    ;;
+  stop)
+    ;;
+  restart)
+    $0 start
+    ;;
+  *)
+    echo "usage: $0 {start}"
+    exit 1
+    ;;
+esac
+exit 0


Property changes on: rfkill/trunk/rfkill.rc.d
___________________________________________________________________
Added: svn:executable
   + *



More information about the arch-commits mailing list