X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Fdistro-install-common%2Fend;h=0204ce50025bd3312267c7bed58c2382c17413a2;hb=f67d4b719356595b424aa3cd358abc79426583c5;hp=1fd8ca6a778cfcba6bb13c0d3ffc9ceba67be740;hpb=78a1427fc167ccee73d448054a9c40c19d737ed3;p=automated-distro-installer diff --git a/fai/config/distro-install-common/end b/fai/config/distro-install-common/end index 1fd8ca6..0204ce5 100755 --- a/fai/config/distro-install-common/end +++ b/fai/config/distro-install-common/end @@ -19,14 +19,10 @@ if [[ -e $src && -e $dst ]]; then fi USER2PW=/q/root/shadow/user2 -if ifclass ziva; then - ROOTPW=/q/root/shadow/ziva -else - # if doesn't exist, we dont set one - ROOTPW=/q/root/shadow/standard - if [[ ! -e $ROOTPW ]]; then - ROOTPW=/q/root/shadow/$HOSTNAME - fi +# if doesn't exist, we dont set one +ROOTPW=/q/root/shadow/standard +if [[ ! -e $ROOTPW ]]; then + ROOTPW=/q/root/shadow/$HOSTNAME fi chpw() { @@ -45,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_BULLSEYE_BOOTSTRAP; then exit 0 fi