mirror of
https://github.com/m8tin/cis.git
synced 2026-11-02 14:17:24 +01:00
Refactoring using "local -r"
This commit is contained in:
9 files changed
+97
-137
No files matched your search
@@ -9,9 +9,7 @@ source /cis/core/base.module.sh
|
||||
# Note that an unprivileged user can use this script successfully,
|
||||
# if no user has to be added to the host because it already exists.
|
||||
function addNormalUser() {
|
||||
local _USER
|
||||
_USER="${1:?"Missing first parameter USER"}"
|
||||
readonly _USER
|
||||
local -r _USER="${1:?"Missing first parameter USER"}"
|
||||
|
||||
#The user already exists
|
||||
id -u "${_USER}" &> /dev/null \
|
||||
|
||||
Reference in new issue
Block a user