mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-28 05:51:43 +01:00
eclass/user-info: Sync with Gentoo
It's from Gentoo commit e1d6ed10e8d940901f9ccef283f21b7383141bda.
This commit is contained in:
parent
fba10f7d6d
commit
80f3e36887
@ -1,4 +1,4 @@
|
||||
# Copyright 1999-2022 Gentoo Authors
|
||||
# Copyright 1999-2023 Gentoo Authors
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
# @ECLASS: user-info.eclass
|
||||
@ -64,7 +64,7 @@ egetent() {
|
||||
getent "${db}" "${key}"
|
||||
else
|
||||
if [[ ${key} =~ ^[[:digit:]]+$ ]]; then
|
||||
grep -E "^([^:]*:){2}${key}" "${ROOT}/etc/${db}"
|
||||
grep -E "^([^:]*:){2}${key}:" "${ROOT}/etc/${db}"
|
||||
else
|
||||
grep "^${key}:" "${ROOT}/etc/${db}"
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user