summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorJohannes Schauer Marin Rodrigues <josch@mister-muffin.de>2021-09-24 10:12:29 +0200
committerJohannes Schauer Marin Rodrigues <josch@mister-muffin.de>2021-09-24 10:12:29 +0200
commitc1d908caf86eadc25a42c35bab355b4a6709a190 (patch)
tree7875e599f1cbf6dc05b07d65700acd6a546a5ac2 /debian
parente62e192139794d4c32b343cef964c57f060458ce (diff)
support DPKG_ROOT in postinst (closes: #993161)
Diffstat (limited to 'debian')
-rw-r--r--debian/libpam-modules.postinst8
-rw-r--r--debian/libpam-runtime.postinst4
2 files changed, 6 insertions, 6 deletions
diff --git a/debian/libpam-modules.postinst b/debian/libpam-modules.postinst
index ce03090b..192c0766 100644
--- a/debian/libpam-modules.postinst
+++ b/debian/libpam-modules.postinst
@@ -5,16 +5,16 @@
if [ -z "$2" ] || dpkg --compare-versions "$2" lt 0.99.7.1-3
then
- if ! [ -f /etc/security/opasswd ]; then
+ if ! [ -f "$DPKG_ROOT/etc/security/opasswd" ]; then
umask 066
- touch /etc/security/opasswd
+ touch "$DPKG_ROOT/etc/security/opasswd"
umask 022
fi
fi
-if dpkg --compare-versions "$2" lt 0.99.9.0-1 && ! [ -f /etc/environment ]
+if dpkg --compare-versions "$2" lt 0.99.9.0-1 && ! [ -f "$DPKG_ROOT/etc/environment" ]
then
- touch /etc/environment
+ touch "$DPKG_ROOT/etc/environment"
fi
if dpkg --compare-versions "$2" lt-nl 1.1.2-1 \
diff --git a/debian/libpam-runtime.postinst b/debian/libpam-runtime.postinst
index 053fdae2..2335c3f3 100644
--- a/debian/libpam-runtime.postinst
+++ b/debian/libpam-runtime.postinst
@@ -20,9 +20,9 @@ then
for configfile in common-auth common-account common-session \
common-password
do
- if [ -f /etc/pam.d/$configfile ] && \
+ if [ -f "$DPKG_ROOT/etc/pam.d/$configfile" ] && \
! fgrep -q $(calculate_md5sum $configfile) \
- /usr/share/pam/$configfile.md5sums 2>/dev/null
+ "$DPKG_ROOT/usr/share/pam/$configfile.md5sums" 2>/dev/null
then
force=
fi