diff options
author | Helmut Grohne <helmut@subdivi.de> | 2021-08-20 14:39:17 +0200 |
---|---|---|
committer | Johannes Schauer Marin Rodrigues <josch@mister-muffin.de> | 2021-08-20 14:39:17 +0200 |
commit | 06d1bd8617d04b1e8812160d39d70c97085b3282 (patch) | |
tree | 8531ef6e2a311a64a246f08c3d831211a2b82f7d /debian | |
parent | d19ac3ae86e69f4fad970ef21bde1b2e1f89edd5 (diff) | |
download | shadow-06d1bd8617d04b1e8812160d39d70c97085b3282.tar.gz |
login.postinstd support for DPKG_ROOT (closes: #992578)
Diffstat (limited to 'debian')
-rw-r--r-- | debian/login.postinst | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/debian/login.postinst b/debian/login.postinst index 8f3ef552..2261e1b6 100644 --- a/debian/login.postinst +++ b/debian/login.postinst @@ -5,23 +5,23 @@ set -e if [ "$1" = "configure" ]; then # Install faillog during initial installs only - if [ "$2" = "" ] && [ ! -f /var/log/faillog ] ; then - touch /var/log/faillog - chown root:root /var/log/faillog - chmod 644 /var/log/faillog + if [ "$2" = "" ] && [ ! -f "$DPKG_ROOT/var/log/faillog" ] ; then + touch "$DPKG_ROOT/var/log/faillog" + chown 0:0 "$DPKG_ROOT/var/log/faillog" + chmod 644 "$DPKG_ROOT/var/log/faillog" fi # Create subuid/subgid if missing - if [ ! -e /etc/subuid ]; then - touch /etc/subuid - chown root:root /etc/subuid - chmod 644 /etc/subuid + if [ ! -e "$DPKG_ROOT/etc/subuid" ]; then + touch "$DPKG_ROOT/etc/subuid" + chown 0:0 "$DPKG_ROOT/etc/subuid" + chmod 644 "$DPKG_ROOT/etc/subuid" fi - if [ ! -e /etc/subgid ]; then - touch /etc/subgid - chown root:root /etc/subgid - chmod 644 /etc/subgid + if [ ! -e "$DPKG_ROOT/etc/subgid" ]; then + touch "$DPKG_ROOT/etc/subgid" + chown 0:0 "$DPKG_ROOT/etc/subgid" + chmod 644 "$DPKG_ROOT/etc/subgid" fi fi |