mirror of
https://github.com/flatcar/scripts.git
synced 2025-11-29 14:31:46 +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
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
# @ECLASS: user-info.eclass
|
# @ECLASS: user-info.eclass
|
||||||
@ -64,7 +64,7 @@ egetent() {
|
|||||||
getent "${db}" "${key}"
|
getent "${db}" "${key}"
|
||||||
else
|
else
|
||||||
if [[ ${key} =~ ^[[:digit:]]+$ ]]; then
|
if [[ ${key} =~ ^[[:digit:]]+$ ]]; then
|
||||||
grep -E "^([^:]*:){2}${key}" "${ROOT}/etc/${db}"
|
grep -E "^([^:]*:){2}${key}:" "${ROOT}/etc/${db}"
|
||||||
else
|
else
|
||||||
grep "^${key}:" "${ROOT}/etc/${db}"
|
grep "^${key}:" "${ROOT}/etc/${db}"
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user