Skip to content

Commit

Permalink
Implemented review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
narc-Ontakac2 committed Oct 10, 2024
1 parent e976126 commit b936b96
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions debian/vzlogger.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
set -e

ADDUSER_VER=$(dpkg-query --showformat='${Version}' --show adduser)
FORCE=""
if dpkg --compare-versions "$ADDUSER_VER" lt 3.131; then
FORCE=" --force-badname "
FORCE="--force-badname"
fi

case "$1" in
Expand All @@ -18,7 +19,7 @@ case "$1" in
groupmod --new-name _vzlogger vzlogger
fi
if ! id _vzlogger > /dev/null 2>&1 ; then
adduser --quiet --system "$FORCE" --no-create-home --home /nonexistent \
adduser --quiet --system $FORCE --no-create-home --home /nonexistent \
--group --disabled-password --shell /bin/false \
_vzlogger
usermod -a -G dialout _vzlogger
Expand Down

0 comments on commit b936b96

Please sign in to comment.