Packages: use groupadd/useradd on Debian-based operating systems.

addgroup/adduser will no longer be installed by default in the
"minbase".  Also, moving to lower-level utilities saves us one runtime
dependency.
This commit is contained in:
Konstantin Pavlov
2023-04-06 20:43:22 -07:00
parent 886aa17e79
commit 6d51672d8d
2 changed files with 8 additions and 10 deletions

View File

@@ -25,17 +25,16 @@ BANNER
fi
if ! getent group unit >/dev/null; then
addgroup --system unit >/dev/null
groupadd --system unit >/dev/null
fi
if ! getent passwd unit >/dev/null; then
adduser \
useradd \
--system \
--disabled-login \
--ingroup unit \
--gid unit \
--no-create-home \
--home /nonexistent \
--gecos "unit user" \
--comment "unit user" \
--shell /bin/false \
unit >/dev/null
fi