mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-29 17:41:05 +02:00
eclass/acct-user: Sync with Gentoo
It's from Gentoo commit c8af7eb1285a2683460618b71e2e9a14ca6badcd.
This commit is contained in:
parent
a2b904afdc
commit
1c7aee24b7
@ -155,7 +155,7 @@ S=${WORKDIR}
|
||||
# Generate appropriate RDEPEND from ACCT_USER_GROUPS. This must be
|
||||
# called if ACCT_USER_GROUPS are set.
|
||||
acct-user_add_deps() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
# ACCT_USER_GROUPS sanity check
|
||||
if [[ $(declare -p ACCT_USER_GROUPS) != "declare -a"* ]]; then
|
||||
@ -218,7 +218,7 @@ eislocked() {
|
||||
# Performs sanity checks for correct eclass usage, and early-checks
|
||||
# whether requested UID can be enforced.
|
||||
acct-user_pkg_pretend() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
# verify that acct-user_add_deps() has been called
|
||||
# (it verifies ACCT_USER_GROUPS itself)
|
||||
@ -267,7 +267,7 @@ acct-user_pkg_pretend() {
|
||||
# Installs a keep-file into the user's home directory to ensure it is
|
||||
# owned by the package, and sysusers.d file.
|
||||
acct-user_src_install() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
# Replace reserved characters in comment
|
||||
: "${ACCT_USER_COMMENT:=${DESCRIPTION//[:,=]/;}}"
|
||||
@ -328,7 +328,7 @@ acct-user_src_install() {
|
||||
# Creates the user if it does not exist yet. Sets permissions
|
||||
# of the home directory in install image.
|
||||
acct-user_pkg_preinst() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
unset _ACCT_USER_ADDED
|
||||
|
||||
@ -397,7 +397,7 @@ acct-user_pkg_preinst() {
|
||||
# Updates user properties if necessary. This needs to be done after
|
||||
# new home directory is installed.
|
||||
acct-user_pkg_postinst() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
if [[ -n ${_ACCT_USER_ADDED} ]]; then
|
||||
# We just added the user; no need to update it
|
||||
@ -481,7 +481,7 @@ acct-user_pkg_postinst() {
|
||||
# @DESCRIPTION:
|
||||
# Ensures that the user account is locked out when it is removed.
|
||||
acct-user_pkg_prerm() {
|
||||
debug-print-function ${FUNCNAME} "${@}"
|
||||
debug-print-function ${FUNCNAME} "$@"
|
||||
|
||||
if [[ -n ${REPLACED_BY_VERSION} ]]; then
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user