Split /etc/login.defs into its own binary package

Closes: #1074394
This commit is contained in:
Chris Hofstaedtler
2024-08-02 17:54:39 +02:00
parent b214d3fb51
commit b7b75e2d61
6 changed files with 39 additions and 1 deletions
View File
+11
View File
@@ -62,12 +62,23 @@ Conflicts:
python-4suite (<< 0.99cvs20060405-1)
Replaces:
hurd (<< 20140206~) [hurd-any]
Pre-Depends:
login.defs (>= 1:4.16.0-1~)
Description: system login tools
This package provides support for console-based logins and for
changing effective user or group IDs, including:
* login, the program that invokes a user shell on a virtual terminal;
* nologin, a dummy shell for disabled user accounts;
Package: login.defs
Architecture: all
Multi-Arch: foreign
Replaces:
login (<< 1:4.16.0-1~)
Description: system user management configuration
This package provides the login.defs configuration file,
used by otherwise unrelated tools managing system users.
Package: uidmap
Architecture: any
Multi-Arch: foreign
+1
View File
@@ -0,0 +1 @@
debian/config/login.defs etc
+26
View File
@@ -0,0 +1,26 @@
#!/bin/sh
set -e
_adopt_conffile() {
conffile=$1
pkg=$2
[ -f ${conffile}.dpkg-bak ] || return 0
md5sum="$(md5sum ${conffile} | sed -e 's/ .*//')"
old_md5sum="$(dpkg-query -W -f='${Conffiles}' $pkg | \
sed -n -e "\' ${conffile} ' { s/ obsolete$//; s/.* //; p }")"
# On new installs, if the conffile was preserved on upgrade by
# dpkg-maintscript helper, copy it back if the new file has not been
# modified yet
if [ "$md5sum" = "$old_md5sum" ]; then
mv ${conffile}.dpkg-bak ${conffile}
fi
}
if [ "$1" = configure ] && [ -z "$2" ]; then
_adopt_conffile /etc/login.defs login.defs
fi
#DEBHELPER#
-1
View File
@@ -1,5 +1,4 @@
bin/login usr/bin
debian/login.defs etc
sbin/nologin usr/sbin
usr/bin/newgrp
usr/share/locale/*/LC_MESSAGES/shadow.mo
+1
View File
@@ -1 +1,2 @@
rm_conffile /etc/securetty 1:4.7-1~
rm_conffile /etc/login.defs 1:4.16.0-1~