summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorMichael Stapelberg <michael@stapelberg.de>2011-07-29 14:05:31 +0200
committerMichael Stapelberg <michael@stapelberg.de>2011-07-29 14:05:31 +0200
commitefaacee72692a53b291c7488a7ee6493ec4d03ef (patch)
treeeeb84d28c992d3b3d7cee43a21c0dbdb36790b34 /debian
parent319664ce43ee38885e053c1f73f565cb231d7516 (diff)
debian/i3status.postinst: Check if setcap is there, print info message if not (Thanks Sander)
Diffstat (limited to 'debian')
-rw-r--r--debian/i3status.postinst8
1 files changed, 7 insertions, 1 deletions
diff --git a/debian/i3status.postinst b/debian/i3status.postinst
index 26eccc4..6507da8 100644
--- a/debian/i3status.postinst
+++ b/debian/i3status.postinst
@@ -5,7 +5,13 @@ set -e
# Allow users to get the speed of ethernet interfaces. This is not a security
# issue as i3status only queries the speed, it does not change any
# configuration.
-setcap cap_net_admin=ep /usr/bin/i3status || true
+if [ -x /sbin/setcap ]
+then
+ setcap cap_net_admin=ep /usr/bin/i3status || true
+else
+ echo "setcap(8) not installed. You need to set CAP_NET_ADMIN \
+to be able to query the network link bandwidth without root privileges."
+fi
#DEBHELPER#