summaryrefslogtreecommitdiff
path: root/debian/libusrp2-0.postinst
diff options
context:
space:
mode:
Diffstat (limited to 'debian/libusrp2-0.postinst')
-rw-r--r--debian/libusrp2-0.postinst20
1 files changed, 20 insertions, 0 deletions
diff --git a/debian/libusrp2-0.postinst b/debian/libusrp2-0.postinst
new file mode 100644
index 000000000..8da31a3cd
--- /dev/null
+++ b/debian/libusrp2-0.postinst
@@ -0,0 +1,20 @@
+#! /bin/sh
+
+set -e
+
+if [ "$1" != "configure" ]; then
+ exit 0
+fi
+
+# Create usrp group for access
+if ! getent group usrp >/dev/null; then
+ addgroup --system usrp
+fi
+
+# Create setuid root for group usrp on socket opener
+chown root:usrp /usr/bin/usrp2_socket_opener
+chmod 04750 /usr/bin/usrp2_socket_opener
+
+#DEBHELPER#
+
+exit 0