aboutsummaryrefslogtreecommitdiff
path: root/debian/libpam-modules.postinst
diff options
context:
space:
mode:
authorSteve Langasek <steve.langasek@canonical.com>2022-10-05 20:57:42 -0700
committerSteve Langasek <steve.langasek@canonical.com>2022-10-05 21:00:08 -0700
commit714a766fcbe0d2cef9cdbefcd247be3aae5d6eef (patch)
tree70f577a20a44f79ff478bd53029ec1b84d5b7102 /debian/libpam-modules.postinst
parentfe1bf3cf4966b89d75f0de6892de494187a03e57 (diff)
parentc1d908caf86eadc25a42c35bab355b4a6709a190 (diff)
downloadpam-714a766fcbe0d2cef9cdbefcd247be3aae5d6eef.tar.gz
pam-714a766fcbe0d2cef9cdbefcd247be3aae5d6eef.tar.bz2
pam-714a766fcbe0d2cef9cdbefcd247be3aae5d6eef.zip
Merge remote-tracking branch 'josch/dpkg-root'
Support DPKG_ROOT in the postinst scripts. Thanks, Johannes Schauer Marin Rodrigues. Bug-Debian: https://bugs.debian.org/993161
Diffstat (limited to 'debian/libpam-modules.postinst')
-rw-r--r--debian/libpam-modules.postinst8
1 files changed, 4 insertions, 4 deletions
diff --git a/debian/libpam-modules.postinst b/debian/libpam-modules.postinst
index 723877cf..20b6bf17 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
#DEBHELPER#