summaryrefslogtreecommitdiff
path: root/setup-user.in
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2022-11-08 17:21:20 +0100
committerNatanael Copa <ncopa@alpinelinux.org>2022-11-08 17:21:20 +0100
commit70c76e7114acb684094067b5a3369bc3dff61e14 (patch)
tree5d37ea12659948c91017972b12945ed747bab48c /setup-user.in
parent1e1ac71fc0e6efe8c6bacc5ff3ba6429a97330cd (diff)
downloadalpine-conf-70c76e7114acb684094067b5a3369bc3dff61e14.zip
setup-user: skip user creation if 'none' is set
Skip user creation if username is 'none' and no other options are set. fixes https://gitlab.alpinelinux.org/alpine/alpine-conf/-/issues/10528
Diffstat (limited to 'setup-user.in')
-rw-r--r--setup-user.in4
1 files changed, 4 insertions, 0 deletions
diff --git a/setup-user.in b/setup-user.in
index 82c2f38..a61749c 100644
--- a/setup-user.in
+++ b/setup-user.in
@@ -38,6 +38,10 @@ while getopts "af:g:hk:u" opt; do
done
shift $(($OPTIND - 1))
+if [ -z "$admin$fullnameopt$groups$keysopt$forceunlock" ] && [ "$1" = "none" ]; then
+ exit 0
+fi
+
if [ $# -gt 1 ]; then
usage "1" >&2
elif [ $# -eq 1 ]; then