small updates
[automated-distro-installer] / fai / config / distro-install-common / end
index 3735142d3507aa798e1f5d36cceafc61e0a511d6..bc4e816bad77d2e36f3e88548421a1f71a474eed 100755 (executable)
@@ -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