summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2023-03-23 17:39:19 +0100
committerUlrich Müller <ulm@gentoo.org>2023-03-26 13:33:25 +0200
commita36bfa82792e102c105cce7b196c1b2f5a0e9526 (patch)
tree8acbfe08e00b82e796cebc617254640703a01b7d /eclass/acct-user.eclass
parentacct-group.eclass: Quote argument of ":" command (diff)
downloadgentoo-a36bfa82792e102c105cce7b196c1b2f5a0e9526.tar.gz
gentoo-a36bfa82792e102c105cce7b196c1b2f5a0e9526.tar.bz2
gentoo-a36bfa82792e102c105cce7b196c1b2f5a0e9526.zip
acct-user.eclass: Quote argument of ":" command
This avoids globbing, see: https://www.shellcheck.net/wiki/SC2223 Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'eclass/acct-user.eclass')
-rw-r--r--eclass/acct-user.eclass18
1 files changed, 9 insertions, 9 deletions
diff --git a/eclass/acct-user.eclass b/eclass/acct-user.eclass
index 145fdb41aaf8..d12dfd21ffd3 100644
--- a/eclass/acct-user.eclass
+++ b/eclass/acct-user.eclass
@@ -80,14 +80,14 @@ readonly ACCT_USER_NAME
# If set to a non-null value, the eclass will require the user to have
# specified UID. If the user already exists with another UID, or
# the UID is taken by another user, the install will fail.
-: ${ACCT_USER_ENFORCE_ID:=}
+: "${ACCT_USER_ENFORCE_ID:=}"
# @ECLASS_VARIABLE: ACCT_USER_NO_MODIFY
# @DEFAULT_UNSET
# @DESCRIPTION:
# If set to a non-null value, the eclass will not make any changes
# to an already existing user.
-: ${ACCT_USER_NO_MODIFY:=}
+: "${ACCT_USER_NO_MODIFY:=}"
# @ECLASS_VARIABLE: ACCT_USER_COMMENT
# @DEFAULT_UNSET
@@ -101,7 +101,7 @@ readonly ACCT_USER_NAME
# The shell to use for the user. If not specified, a 'nologin' variant
# for the system is used. This can be overriden in make.conf through
# ACCT_USER_<UPPERCASE_USERNAME>_SHELL variable.
-: ${ACCT_USER_SHELL:=/sbin/nologin}
+: "${ACCT_USER_SHELL:=/sbin/nologin}"
# @ECLASS_VARIABLE: ACCT_USER_HOME
# @DESCRIPTION:
@@ -110,7 +110,7 @@ readonly ACCT_USER_NAME
# not exist. When updating, existing home directory will not be moved.
# This can be overriden in make.conf through
# ACCT_USER_<UPPERCASE_USERNAME>_HOME variable.
-: ${ACCT_USER_HOME:=/dev/null}
+: "${ACCT_USER_HOME:=/dev/null}"
# @ECLASS_VARIABLE: ACCT_USER_HOME_OWNER
# @DEFAULT_UNSET
@@ -125,7 +125,7 @@ readonly ACCT_USER_NAME
# The permissions to use for the home directory, in chmod (octal
# or verbose) form. This can be overriden in make.conf through
# ACCT_USER_<UPPERCASE_USERNAME>_HOME_PERMS variable.
-: ${ACCT_USER_HOME_PERMS:=0755}
+: "${ACCT_USER_HOME_PERMS:=0755}"
# @ECLASS_VARIABLE: ACCT_USER_GROUPS
# @REQUIRED
@@ -142,9 +142,9 @@ readonly ACCT_USER_NAME
# << Boilerplate ebuild variables >>
-: ${DESCRIPTION:="System user: ${ACCT_USER_NAME}"}
-: ${SLOT:=0}
-: ${KEYWORDS:=alpha amd64 arm arm64 hppa ia64 ~loong m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris}
+: "${DESCRIPTION:="System user: ${ACCT_USER_NAME}"}"
+: "${SLOT:=0}"
+: "${KEYWORDS:=alpha amd64 arm arm64 hppa ia64 ~loong m68k ~mips ppc ppc64 ~riscv s390 sparc x86 ~x64-cygwin ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~sparc-solaris ~sparc64-solaris ~x64-solaris ~x86-solaris}"
S=${WORKDIR}
@@ -269,7 +269,7 @@ acct-user_src_install() {
debug-print-function ${FUNCNAME} "${@}"
# Replace reserved characters in comment
- : ${ACCT_USER_COMMENT:=${DESCRIPTION//[:,=]/;}}
+ : "${ACCT_USER_COMMENT:=${DESCRIPTION//[:,=]/;}}"
# serialize for override support
local ACCT_USER_GROUPS=${ACCT_USER_GROUPS[*]}