summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO7
-rw-r--r--PKGBUILD9
-rwxr-xr-x[-rw-r--r--]iwscanner28
3 files changed, 24 insertions, 20 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 2c9d2aaa17b6..e849fb8fb88a 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,21 +1,22 @@
pkgbase = iwscanner
pkgdesc = Wireless scanner with an easy to use graphic interface and using the iwlist tool
pkgver = 0.2.4
- pkgrel = 5
+ pkgrel = 6
url = http://kuthulu.com/iwscanner
arch = any
license = LGPL
depends = pygtk
depends = python2
depends = wireless_tools
- optdepends = kdesu: privilege escalation to use wireless tools
+ optdepends = gksu: privilege escalation to use wireless tools
+ optdepends = kde-cli-tools: privilege escalation (kdesu) to use wireless tools
options = !emptydirs
source = http://kuthulu.com/iwscanner/iwscanner-0.2.4.tgz
source = iwscanner
source = iwscanner.desktop
source = setup.py
md5sums = 436d37e5a1bf2d26bcd0e77e2ebaeb3a
- md5sums = 7dcbc65395faba817a3653db7d07224a
+ md5sums = a7a7fb1ca440e000ef97c96515be29db
md5sums = d0613547024a89444c34ef2b34d8427c
md5sums = 470cb6fb4539e7d580086178304c95a9
diff --git a/PKGBUILD b/PKGBUILD
index 9c29350f353a..59278ca999e0 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,21 +2,22 @@
pkgname=iwscanner
pkgver=0.2.4
-pkgrel=5
+pkgrel=6
pkgdesc="Wireless scanner with an easy to use graphic interface and using the iwlist tool"
arch=('any')
url="http://kuthulu.com/iwscanner"
license=('LGPL')
depends=('pygtk' 'python2' 'wireless_tools')
-optdepends=('kdesu: privilege escalation to use wireless tools')
+optdepends=('gksu: privilege escalation to use wireless tools'
+ 'kde-cli-tools: privilege escalation (kdesu) to use wireless tools')
options=(!emptydirs)
-# Additional source files are based on the opensuse 'iwscanner' rpm
+# Additional source files are based on the openSUSE 'iwscanner' RPM
source=(http://kuthulu.com/iwscanner/iwscanner-$pkgver.tgz
iwscanner
iwscanner.desktop
setup.py)
md5sums=('436d37e5a1bf2d26bcd0e77e2ebaeb3a'
- '7dcbc65395faba817a3653db7d07224a'
+ 'a7a7fb1ca440e000ef97c96515be29db'
'd0613547024a89444c34ef2b34d8427c'
'470cb6fb4539e7d580086178304c95a9')
diff --git a/iwscanner b/iwscanner
index b4ffe4a1cf70..a4f57f94806b 100644..100755
--- a/iwscanner
+++ b/iwscanner
@@ -1,19 +1,21 @@
#!/bin/sh
-#Simple script to start iwscanner
+
+# Simple iwscanner launch script
+
+CMD=/usr/share/iwscanner/iwscanner.py
+
+if [ "$(id -ru)" -eq 0 ]; then
+ # Already root user
+ exec $CMD
+fi
GKSU=/usr/bin/gksu
KDESU=/usr/bin/kdesu
-GKSUDO=/usr/bin/gksudo
-
-if [ -e "$GKSU" ]
- then
- $GKSU /usr/share/iwscanner/iwscanner.py
-elif [ -e "$KDESU" ]
- then
- $KDESU -c /usr/share/iwscanner/iwscanner.py
-elif [ -e "$GKSUDO" ]
- then
- $GKSUDO -c /usr/share/iwscanner/iwscanner.py
+if [ -e "$GKSU" ]; then
+ exec $GKSU $CMD
+elif [ -e "$KDESU" ]; then
+ exec $KDESU -c $CMD
else
- echo "Unable to find suitable su application, please install gksu"
+ printf "Unable to find suitable su application, please install gksu or kde-cli-tools (kdesu)\n" 1>&2
fi
+