+sys-user_create() {
+ # Create the user whose information is contained in the following
+ # variables:
+ #
+ # * SYS_USER_NAME
+ # * SYS_USER_UID
+ # * SYS_USER_SHELL
+ # * SYS_USER_HOME
+ # * SYS_USER_GROUPS
+ #
+ # We don't create a group with the same name; that should be the
+ # job of the matching sys-group package.
+ useradd --no-user-group \
+ ${SYS_USER_UID:+--uid }"${SYS_USER_UID}" \
+ ${SYS_USER_GROUPS:+--groups }"${SYS_USER_GROUPS}" \
+ --shell "${SYS_USER_SHELL}" \
+ --home-dir "${SYS_USER_HOME}" \
+ "${SYS_USER_NAME}"
+}
+
+