security-misc/debian/security-misc.postinst

77 lines
2.2 KiB
Plaintext
Raw Normal View History

#!/bin/bash
2023-03-30 13:08:47 +07:00
## Copyright (C) 2012 - 2023 ENCRYPTED SUPPORT LP <adrelanos@whonix.org>
## See the file COPYING for copying conditions.
if [ -f /usr/libexec/helper-scripts/pre.bsh ]; then
source /usr/libexec/helper-scripts/pre.bsh
fi
set -e
true "
#####################################################################
2017-03-06 22:00:33 +07:00
## INFO: BEGIN: $DPKG_MAINTSCRIPT_PACKAGE $DPKG_MAINTSCRIPT_NAME $@
#####################################################################
"
case "$1" in
configure)
2020-04-06 20:25:45 +07:00
if [ -d /etc/skel/.gnupg ]; then
## Lintian warns against use of chmod --recursive.
chmod 700 /etc/skel/.gnupg
fi
2019-12-08 13:59:55 +07:00
## /usr/share/glib-2.0/schemas/30_security-misc.gschema.override
glib-compile-schemas /usr/share/glib-2.0/schemas || true
;;
abort-upgrade|abort-remove|abort-deconfigure)
;;
triggered)
echo "INFO: triggered $DPKG_MAINTSCRIPT_PACKAGE: '$DPKG_MAINTSCRIPT_PACKAGE' $DPKG_MAINTSCRIPT_PACKAGE DPKG_MAINTSCRIPT_NAME: '$DPKG_MAINTSCRIPT_NAME' $\@: '$@' 2: '$2'"
/usr/share/security-misc/lkrg/lkrg-virtualbox || true
/usr/libexec/security-misc/mmap-rnd-bits || true
exit 0
;;
*)
echo "$DPKG_MAINTSCRIPT_NAME called with unknown argument \`$1'" >&2
exit 1
;;
esac
pam-auth-update --package
/usr/libexec/security-misc/permission-lockdown
## https://phabricator.whonix.org/T377
## Debian has no update-grub trigger yet:
## https://bugs.debian.org/481542
if command -v update-grub >/dev/null 2>&1; then
update-grub || \
echo "$DPKG_MAINTSCRIPT_PACKAGE $DPKG_MAINTSCRIPT_NAME ERROR: Running \
'update-grub' failed with exit code $?. $DPKG_MAINTSCRIPT_PACKAGE is most \
likely only the trigger, not the cause. Unless you know this is not an issue, \
you should fix running 'update-grub', otherwise your system might no longer \
boot." >&2
fi
/usr/libexec/security-misc/mmap-rnd-bits
true "INFO: debhelper beginning here."
#DEBHELPER#
true "INFO: Done with debhelper."
true "
#####################################################################
2017-03-06 22:00:33 +07:00
## INFO: END : $DPKG_MAINTSCRIPT_PACKAGE $DPKG_MAINTSCRIPT_NAME $@
#####################################################################
"
## Explicitly "exit 0", so eventually trapped errors can be ignored.
exit 0