X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Fhooks%2Finstsoft.DEFAULT;h=3eda00ee9d6a57873c2cce167729eaefc28cc4c2;hb=c8bd51084bc4d90b9653d521e7cb05e17e417d97;hp=1879648b73a71afd0d705ce2efe78c55c2be67cb;hpb=a129832a849aa87163b866982c214bbdd7314a52;p=automated-distro-installer diff --git a/fai/config/hooks/instsoft.DEFAULT b/fai/config/hooks/instsoft.DEFAULT index 1879648..3eda00e 100755 --- a/fai/config/hooks/instsoft.DEFAULT +++ b/fai/config/hooks/instsoft.DEFAULT @@ -5,19 +5,38 @@ 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 + d=$target/q/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 + chmod -R o-rwx $d + d=$target/q/root/luks 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/luks/host-{tp,demohost} $d + chmod -R o-rwx $d fi