Commit 53609921 authored by Michael Shigorin's avatar Michael Shigorin

deflogin: minor tweaks

Defining a one-time variable is useless in this case, and README should state the undefined ROOTPW status explicitly (since it's now as advertized, heh).
parent 0fcb4915
Эта фича конфигурирует root login и пользователей по умолчанию. Эта фича конфигурирует root login и пользователей по умолчанию.
Если ROOTPW не задан, то подходящий пароль не существует.
ВНИМАНИЕ: применяйте разумно, т.к. крайне легко создать и оставить ВНИМАНИЕ: применяйте разумно, т.к. крайне легко создать и оставить
дыру в безопасности! дыру в безопасности!
#!/bin/sh #!/bin/sh
# set root password if any; no-op if it is unset # set root password if any; no-op if it is unset
test="${GLOBAL_ROOTPW=:unset}" if [ "${GLOBAL_ROOTPW=:unset}" = ":unset" ]; then
if [ "$test" = ":unset" ]; then
echo "** warning: no root password provided, you're on your own" >&2 echo "** warning: no root password provided, you're on your own" >&2
else else
echo "$GLOBAL_ROOTPW" | passwd --stdin root echo "$GLOBAL_ROOTPW" | passwd --stdin root
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment