X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Fdistro-install-common%2Fend;h=3948073df0ec311cbc01bc9efe63e52011b3409a;hb=ef0a70393a38632614fa6382f52546b1177b9f28;hp=54a7b43d66289e741392a8b0e0f1041f1dc47261;hpb=9ac5bbeccb3e969e29b372656bd51352ff31b0b8;p=automated-distro-installer diff --git a/fai/config/distro-install-common/end b/fai/config/distro-install-common/end index 54a7b43..3948073 100755 --- a/fai/config/distro-install-common/end +++ b/fai/config/distro-install-common/end @@ -17,10 +17,6 @@ if [[ -e $src && -e $dst ]]; then cp -rT $src $dst fi -if ifclass VOL_STRETCH_BOOTSTRAP; then - exit 0 -fi - TPW=/q/root/shadow/traci-simple if ifclass tp; then ROOTPW=/q/root/shadow/standard @@ -44,14 +40,21 @@ chpw() { echo "$0: warning: no pw set for $user" >&2 fi } -au() { # add user +au() { # add user. i don't use adduser for portability if ! $ROOTCMD getent passwd ${@: -1}; then - $ROOTCMD useradd -m -s /bin/bash $@ + $ROOTCMD useradd -Um -s /bin/bash $@ fi } chpw root "$ROOTPW" -# 9 = user already exists. so we are idempotent. + +# only setup root pass for bootstrap vol +if ifclass VOL_STRETCH_BOOTSTRAP; then + exit 0 +fi + + +# return of 9 = user already exists. so we are idempotent. au iank chpw iank "$ROOTPW"