iankelling.org
/
git
/
automated-distro-installer
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
main fai scripts can run outside of fai, fixup stuff
[automated-distro-installer]
/
fai
/
config
/
hooks
/
instsoft.DEFAULT
diff --git
a/fai/config/hooks/instsoft.DEFAULT
b/fai/config/hooks/instsoft.DEFAULT
index 1879648b73a71afd0d705ce2efe78c55c2be67cb..3eda00ee9d6a57873c2cce167729eaefc28cc4c2 100755
(executable)
--- 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
exit 0
fi
+keyfile=/var/lib/fai/config/distro-install-common/luks/host-$HOSTNAME
f=$target/root/keyscript
cat > $f <<EOFOUTER
#!/bin/sh
cat <<'EOF'
f=$target/root/keyscript
cat > $f <<EOFOUTER
#!/bin/sh
cat <<'EOF'
-$(cat
/var/lib/fai/config/distro-install-common/luks/host-$HOSTNAME
)
+$(cat
$keyfile
)
EOF
EOFOUTER
EOF
EOFOUTER
+chmod +x $f
+
+f=$target/root/keyscript-manual
+cat >$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
chmod +x $f
+
if ifclass tp; then
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
mkdir -p $d
- ls -la /var/lib/fai/config/distro-install-common
- c
p /var/lib/fai/config/distro-install-common/traci{-simple}
$d
+ cp /var/lib/fai/config/distro-install-common/luks/host-{tp,demohost} $d
+ c
hmod -R o-rwx
$d
fi
fi