X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Fhooks%2Finstsoft.DEFAULT;h=ab6e213617f02f65094b554d2f41e4a8da3b2c11;hb=ce5290b5a6eee95cc59b5c1651d73a224c3d5bbd;hp=1879648b73a71afd0d705ce2efe78c55c2be67cb;hpb=a129832a849aa87163b866982c214bbdd7314a52;p=automated-distro-installer diff --git a/fai/config/hooks/instsoft.DEFAULT b/fai/config/hooks/instsoft.DEFAULT index 1879648..ab6e213 100755 --- a/fai/config/hooks/instsoft.DEFAULT +++ b/fai/config/hooks/instsoft.DEFAULT @@ -5,19 +5,41 @@ if ifclass VM && ! ifclass demohost; then exit 0 fi +keyfile=/var/lib/fai/config/distro-install-common/luks/host-$HOSTNAME f=$target/root/keyscript cat > $f <$f <<'EOF' +#!/bin/sh +if ! [ -e /tmp/key ]; then + stty -echo + read pass + printf '%s' "$pass" > /tmp/key +fi +cat /tmp/key +EOF chmod +x $f + if ifclass tp; then d=$target/root/shadow mkdir -p $d ls -la /var/lib/fai/config/distro-install-common - cp /var/lib/fai/config/distro-install-common/traci{-simple} $d + cp /var/lib/fai/config/distro-install-common/traci{,-simple} $d fi