#!/bin/sh -e
# Creates new user account and prepares Homeros environment in newly created home directory
# Michael Pozhidaev <msp@altlinux.org>
# Date: 2011-12-09

THIS="${0##*/}"

if [ -z "$1" ]; then
    echo "$THIS:new user account name is not specified" >&2
    exit 1;
fi

if [ "$1" == '--help' ]; then
cat <<EOF
$THIS: the utility to create and prepare new user account with Homeros settings
Usage: $THIS [--help] [ADDITIONAL_OPTIONS_TO_USERADD]
NOTE: This utility does not set any password for newly created account. Use passwd command after $THIS invocation.
EOF
    exit 0
fi

exec /usr/sbin/useradd -m -k /etc/skel.homeros.ru_RU.UTF-8 "$@"
