Merge branch 'upstream'
[automated-distro-installer] / faiserver-setup
index f1ab4bad195b033a2ba084916208dbd57b7300df..0bf61caf12940d5f559a53de2155bc55b61d2ed5 100755 (executable)
@@ -15,8 +15,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 
-set -eE -o pipefail
-trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
+x="$(readlink -f "$BASH_SOURCE")"; source "${x%/*}/bash-trace"
 
 [[ $EUID == 0 ]] || exec sudo "${BASH_SOURCE}" "$@"
 
@@ -148,6 +147,8 @@ fi
 # tried out a stretch base, doesn't work yet.
 #
 $sed -f - /etc/fai/nfsroot.conf <<EOF
+$ a FAI_ROOTPW="$(</q/root/shadow/standard)"
+/^\s*FAI_ROOTPW/d
 s,^( *FAI_DEBOOTSTRAP=).*,\1"$base $r",
 # add --arch amd64. this is needed on arm system which is
 # used to install amd64 clients. On amd64 servers, it's redundant.