X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=fai%2Fconfig%2Fdistro-install-common%2Fend;h=bc4e816bad77d2e36f3e88548421a1f71a474eed;hp=3735142d3507aa798e1f5d36cceafc61e0a511d6;hb=1728af7e3060c8608c622f210d6e16f7d085d8f9;hpb=c90a6fcdae53853a1e7d74dfcfa5d86cb7d81096 diff --git a/fai/config/distro-install-common/end b/fai/config/distro-install-common/end index 3735142..bc4e816 100755 --- a/fai/config/distro-install-common/end +++ b/fai/config/distro-install-common/end @@ -30,9 +30,9 @@ chpw() { echo "$0: warning: no pw set for $user" >&2 fi } -au() { - if ! $ROOTCMD getent passwd $1; then - $ROOTCMD useradd -m -s /bin/bash $1 || [[ $? == 9 ]] +au() { # add user + if ! $ROOTCMD getent passwd ${@: -1}; then + $ROOTCMD useradd -m -s /bin/bash $@ fi } @@ -81,3 +81,5 @@ while true; do dir=$(dirname $dir) if [[ $dir == /p ]]; then break; fi done + +au -s /bin/false --home-dir /var/lib/bitcoind bitcoin