Skip to content

Commit

Permalink
rearrange pregroup - #119
Browse files Browse the repository at this point in the history
  • Loading branch information
retrogradeorbit committed Jul 22, 2020
1 parent 04ed91f commit 49aab66
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/clj/spire/module/user_present.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ if [ "$PWD_LINE" ]; then
# echo "exp: $OEXPIRE"

ARGS=""
PRE_GROUPS=$(groups "$NAME")
EXIT=0

if [ "$COMMENT" ] && [ "$COMMENT" != "$OCOMMENT" ]; then
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -155,7 +155,6 @@ else
fi

COMMAND="useradd${ARGS} '$NAME'"
PRE_GROUPS=""
fi

# echo "command:"
Expand Down

0 comments on commit 49aab66

Please sign in to comment.