mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-19 20:09:01 +02:00
nixos/users-groups: fix broken linger
This commit is contained in:
parent
c2684b4d2d
commit
564c3749d9
|
@ -704,8 +704,9 @@ in {
|
|||
in stringAfter [ "users" ] ''
|
||||
if [ -e ${lingerDir} ] ; then
|
||||
cd ${lingerDir}
|
||||
for user in ${lingerDir}/*; do
|
||||
if ! id "$user" >/dev/null 2>&1; then
|
||||
for user in $(ls); do
|
||||
if ! id "$user" >/dev/null; then
|
||||
echo "Removing linger for deleted user $user"
|
||||
rm --force -- "$user"
|
||||
fi
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue