File: postinst

package info (click to toggle)
hercules 3.13-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 14,392 kB
  • sloc: ansic: 175,124; sh: 8,792; makefile: 760; perl: 149
file content (17 lines) | stat: -rw-r--r-- 349 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/sh
set -e

PROGRAM=/usr/libexec/hercules/hercifc

if [ "$1" = configure ]; then
	if which setcap > /dev/null && [ -e "$PROGRAM" ]; then
		if ! setcap CAP_NET_ADMIN=ep "$PROGRAM" >/dev/null 2>&1; then
			cat <<EOT
Setting capabilities for hercifc failed; TUN/TAP networking might not work
as an unprivileged user.
EOT
		fi
	fi
fi

#DEBHELPER#