diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:41:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:41:35 +0000 |
commit | 9c80e2b0a6da1aab8c99efc9200d15f1124dc8c4 (patch) | |
tree | 7611716063eca933355f485079046f3cb2141e0c /debian/tcpdump.postinst | |
parent | Adding upstream version 4.99.3. (diff) | |
download | tcpdump-9c80e2b0a6da1aab8c99efc9200d15f1124dc8c4.tar.xz tcpdump-9c80e2b0a6da1aab8c99efc9200d15f1124dc8c4.zip |
Adding debian version 4.99.3-1.debian/4.99.3-1debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | debian/tcpdump.postinst | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/debian/tcpdump.postinst b/debian/tcpdump.postinst new file mode 100755 index 0000000..a9d1909 --- /dev/null +++ b/debian/tcpdump.postinst @@ -0,0 +1,26 @@ +#!/bin/sh -e + +if ! getent group tcpdump >/dev/null 2>&1; then + addgroup --system --quiet tcpdump +fi +if ! getent passwd tcpdump >/dev/null 2>&1; then + adduser --system --quiet --ingroup tcpdump \ + --no-create-home --home /nonexistent \ + tcpdump +fi + +# dh_apparmor leaves behind the local profile for the old binary +# location (/usr/sbin/tcpdump), we need to clean it up (#990554). +# +# Only remove it if it's empty, meaning that the system doesn't have +# local configuration. +if dpkg --compare-versions "$2" lt-nl "4.99.1-3~"; then + OLD_LOCAL_APP_PROFILE="/etc/apparmor.d/local/usr.sbin.tcpdump" + if [ -e "$OLD_LOCAL_APP_PROFILE" ]; then + if [ ! -s "$OLD_LOCAL_APP_PROFILE" ]; then + rm -f "$OLD_LOCAL_APP_PROFILE" + fi + fi +fi + +#DEBHELPER# |