various fixes mostly for linode
[automated-distro-installer] / fai / config / hooks / partition.DEFAULT
index 2905435b752b89d6b5a7696f1b680ab62f1a658a..ab436bdad797d35b60e0339237b731a164fbd09e 100755 (executable)
@@ -297,8 +297,7 @@ bpart() { # btrfs a partition
 }
 
 
-# keyfiles generated like:
-# head -c 2048 /dev/urandom | od | s dd of=/q/root/luks/host-demohost
+# see README for docs about how to create these
 luks_dir=${LUKS_DIR:-/var/lib/fai/config/distro-install-common/luks}
 
 
@@ -318,12 +317,12 @@ fi
 # # note, corresponding changes in /b/ds/keyscript-{on,off}
 if ifclass tpnew; then
   lukspw=$(cat $luks_dir/traci)
-elif ifclass BUSTER_LINODE; then
-  lukspw=$(cat $luks_dir/li)
 elif ifclass ziva; then
   lukspw=$(cat $luks_dir/ziva)
 elif ifclass demohost; then
   lukspw=x
+elif [[ -e $luks_dir/$HOSTNAME ]]; then
+  lukspw=$(cat $luks_dir/$HOSTNAME)
 else
   lukspw=$(cat $luks_dir/iank)
 fi