From: Ian Kelling Date: Sat, 11 Feb 2017 11:20:38 +0000 (-0800) Subject: various fixes X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=bdcc37dee90597b4a65c2ae24b9fc26f15adfc11;p=automated-distro-installer various fixes fix regression from cleanup make arch have parity with fai --- diff --git a/fai-revm b/fai-revm index 6f8beeb..57e5586 100755 --- a/fai-revm +++ b/fai-revm @@ -127,9 +127,8 @@ if [[ $SSH_CLIENT ]]; then fi sleep 30 -while ! timeout -s 9 10 ssh root@$name /bin/true; do +while ! timeout -s 9 10 ssh -oBatchMode=yes root@$name /bin/true; do e sleep 5 - khfix root@$name ||: done cleanup() { :; } e pxe-server diff --git a/fai/config/distro-install-common/end b/fai/config/distro-install-common/end index bc4e816..629e47a 100755 --- a/fai/config/distro-install-common/end +++ b/fai/config/distro-install-common/end @@ -66,6 +66,15 @@ if [[ ! -e $f ]] || ! grep -xF "$line" $f; then echo "$line" >> $f fi +# ssh host keys +# note, $BASH_SOURCE is not defined here under fai. +src=$(dirname "$0")/p/c/machine_specific/$HOSTNAME/filesystem/etc/ssh +dst=$target/etc/ssh +if [[ -e $src && -e $dst ]]; then + # outside of fai context, we skip this + cp -rT $src $dst +fi + dir=/p/c/machine_specific/$HOSTNAME/.unison $ROOTCMD mkdir -p $dir diff --git a/fai/config/hooks/partition.DEFAULT b/fai/config/hooks/partition.DEFAULT index 9914a45..2db69b3 100755 --- a/fai/config/hooks/partition.DEFAULT +++ b/fai/config/hooks/partition.DEFAULT @@ -65,21 +65,18 @@ add-part() { # add partition suffix to $dev echo $ret } -# Functions here are commented because they are unused, but left -# intentionally because they follow the pattern and could be useful in -# the future. -#bootdev() { add-part $@ $bootn; } +bootdev() { add-part $@ $bootn; } rootdev() { add-part $@ $rootn; } swapdev() { add-part $@ $swapn; } grub_extdev() { add-part $@ $grub_extn; } -#bios_grubdev() { add-part $@ $bios_grubn; } +bios_grubdev() { add-part $@ $bios_grubn; } crypt-dev() { echo /dev/mapper/crypt_dev_${1##*/}; } crypt-name() { echo crypt_dev_${1##*/}; } root-cryptdev() { crypt-dev $(rootdev $@); } -#swap-cryptdev() { crypt-dev $(swapdev $@); } -#root-cryptname() { crypt-name $(rootdev $@); } -#swap-cryptname() { crypt-name $(swapdev $@); } +swap-cryptdev() { crypt-dev $(swapdev $@); } +root-cryptname() { crypt-name $(rootdev $@); } +swap-cryptname() { crypt-name $(swapdev $@); } ##### end function defs diff --git a/fai/config/scripts/GRUB_PC/11-ian b/fai/config/scripts/GRUB_PC/11-ian index 0a3bbdb..8cd841f 100755 --- a/fai/config/scripts/GRUB_PC/11-ian +++ b/fai/config/scripts/GRUB_PC/11-ian @@ -39,15 +39,6 @@ if [[ ! -e $dst && -e $src ]]; then mkdir -p $dst mount -o bind $src $dst fi -# todo, port this over to the arch install script. -src=$FAI/distro-install-common/p/c/machine_specific/$HOSTNAME/filesystem/etc/ssh -dst=/target/etc/ssh -if [[ -e $src && -e $dst ]]; then - # outside of fai context, we skip this - cp -rT $src $dst -fi - -fcopy -riB /etc/ssh if ifclass VOL_STABLE_BOOTSTRAP; then fcopy -ri /etc/systemd/system