From 49aab66bc35976ba7a001f705beabecdf95e98de Mon Sep 17 00:00:00 2001 From: Crispin Wellington Date: Thu, 23 Jul 2020 00:09:58 +0800 Subject: [PATCH] rearrange pregroup - #119 --- src/clj/spire/module/user_present.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/clj/spire/module/user_present.sh b/src/clj/spire/module/user_present.sh index eed3123..9d7a552 100644 --- a/src/clj/spire/module/user_present.sh +++ b/src/clj/spire/module/user_present.sh @@ -36,6 +36,7 @@ if [ "$PWD_LINE" ]; then # echo "exp: $OEXPIRE" ARGS="" + PRE_GROUPS=$(groups "$NAME") EXIT=0 if [ "$COMMENT" ] && [ "$COMMENT" != "$OCOMMENT" ]; then @@ -107,11 +108,10 @@ if [ "$PWD_LINE" ]; then else COMMAND="true" fi - - PRE_GROUPS=$(groups "$NAME") else # user does not exist ARGS="" + PRE_GROUPS="" EXIT=0 if [ "$COMMENT" ]; then @@ -155,7 +155,6 @@ else fi COMMAND="useradd${ARGS} '$NAME'" - PRE_GROUPS="" fi # echo "command:"