| 1 |
#! /bin/sh -e |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
case "$1" in |
| 6 |
configure) |
| 7 |
if ! getent group | grep -q "^stapdev:"; then |
| 8 |
echo "Adding stapdev group..." |
| 9 |
addgroup --quiet --system stapdev || true |
| 10 |
fi |
| 11 |
if ! getent group | grep -q "^stapusr:"; then |
| 12 |
echo "Adding stapusr group..." |
| 13 |
addgroup --quiet --system stapusr || true |
| 14 |
fi |
| 15 |
if ! getent group | grep -q "^stapsys:"; then |
| 16 |
echo "Adding stapsys group..." |
| 17 |
addgroup --quiet --system stapsys || true |
| 18 |
fi |
| 19 |
|
| 20 |
# Fixup staprun binary for new group 'stapusr'. |
| 21 |
if ! dpkg-statoverride --list /usr/bin/staprun > /dev/null ; then |
| 22 |
dpkg-statoverride --update --add root stapusr 4754 /usr/bin/staprun |
| 23 |
fi |
| 24 |
|
| 25 |
# Fixup stapbpf binary for new group 'stapusr'. |
| 26 |
if ! dpkg-statoverride --list /usr/bin/stapbpf > /dev/null ; then |
| 27 |
dpkg-statoverride --update --add root stapusr 4754 /usr/bin/stapbpf |
| 28 |
fi |
| 29 |
;; |
| 30 |
abort-upgrade|abort-remove|abort-deconfigure) |
| 31 |
;; |
| 32 |
*) |
| 33 |
echo "$0 called with unknown argument '$1'" >&2 |
| 34 |
exit 1 |
| 35 |
;; |
| 36 |
esac |
| 37 |
|
| 38 |
#DEBHELPER# |