X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Fdistro-install-common%2Fend;h=b0e070048e4df3ce7b6a44085a19bb23e88d0e5a;hb=2230b58f86d24175583f2ce60d271f66d4f122ea;hp=2871106fbc593a0196242fcc2074c0e86fe2a79f;hpb=ee37d990c89bb3bab1b54e3b3fb43e9f79ed039b;p=automated-distro-installer diff --git a/fai/config/distro-install-common/end b/fai/config/distro-install-common/end index 2871106..b0e0700 100755 --- a/fai/config/distro-install-common/end +++ b/fai/config/distro-install-common/end @@ -19,10 +19,10 @@ if [[ -e $src && -e $dst ]]; then fi USER2PW=/q/root/shadow/user2 -if ifclass ziva; then - ROOTPW=/q/root/shadow/ziva -else - ROOTPW=/q/root/shadow/standard +# if doesn't exist, we dont set one +ROOTPW=/q/root/shadow/standard +if [[ ! -e $ROOTPW ]]; then + ROOTPW=/q/root/shadow/$HOSTNAME fi chpw() { @@ -41,15 +41,16 @@ chpw() { fi } au() { # add user. i don't use adduser for portability - if ! $ROOTCMD getent passwd ${@: -1}; then - $ROOTCMD useradd -Um -s /bin/bash $@ + local user=${@: -1} + if ! $ROOTCMD getent passwd $user; then + $ROOTCMD useradd -c $user -Um -s /bin/bash $@ fi } chpw root "$ROOTPW" # only setup root pass for bootstrap vol -if ifclass VOL_STRETCH_BOOTSTRAP; then +if ifclass VOL_BUSTER_BOOTSTRAP; then exit 0 fi