X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=fai-redep;h=05414973ff69f9607fb7fec8f75897540cc5c2e4;hp=7c8b9dd2ea3c9e5eabb6ec899adc602c8aac28f7;hb=HEAD;hpb=1e6019a5846160b3f62fc94357e16944b5b3527b diff --git a/fai-redep b/fai-redep index 7c8b9dd..b90b30a 100755 --- a/fai-redep +++ b/fai-redep @@ -59,7 +59,8 @@ m() { printf "$pre %s\n" "$*"; "$@"; } # i use faiserver as a dns alias, but ssh key is associated with # a canonical hostname and we will have ssh warning spam unless we # use it, so look it up just to avoid the warning spam. -faiserver_host=$(/a/exe/chost $host) || faiserver_host=$host +faiserver_host=$(/a/exe/chost $host) +# faiserver_host=$host faiserver_addr=$(host $host | sed -rn 's/^\S+ has address //p;T;q' ||:) if ! ip a | grep "^ *inet.\? $faiserver_addr" &>/dev/null; then @@ -74,12 +75,12 @@ rsync -atL /home/iank/.ssh/authorized_keys fai/config/files/root/.ssh/authorized install --owner=iank --group=iank -d fai/config/files/usr/local/bin/hssh install --owner=iank --group=iank -d fai/config/files/usr/local/bin/ssh_filter_btrbk.sh rsync -atL /a/opt/btrbk/ssh_filter_btrbk.sh fai/config/files/usr/local/bin/ssh_filter_btrbk.sh/STANDARD - m rsync -rlpt --delete --relative --exclude /fai/config/basefiles/ fai/config "${rpre[@]}"/srv # todo: automatically disable faiserver after a period so # these files are not available. + if [[ $target ]]; then secret_files=(luks/$target luks/host-$target shadow/$target) exists=false @@ -101,6 +102,11 @@ else rsync -rlpt /q/root/shadow /q/root/luks "${rpre[@]}"/srv/fai/config/distro-install-common fi +rsync -rlpt --delete /a/opt/btrfs-progs-release \ + filesystem/usr/local/bin/ethusb-nm \ + filesystem/usr/local/bin/ethusb-static \ + "${rpre[@]}"/srv/fai/config/distro-install-common + dirs=(/p/c/machine_specific/${target:-*}/filesystem/etc/ssh) if [[ -e ${dirs[0]} ]]; then rsync -rlpt --delete --relative ${dirs[@]} "${rpre[@]}"/srv/fai/config/distro-install-common @@ -110,7 +116,7 @@ fi pall+=($(/a/bin/buildscripts/emacs -p; /a/bin/distro-setup/distro-pkgs $distro)) printf "%s\n%s\n" "PACKAGES install" ${pall[*]} | \ - $faiserver_shell dd of=/srv/fai/config/package_config/DESKTOP 2>/dev/null ||: # broken pipe + $faiserver_shell dd of=/srv/fai/config/package_config/DESKTOP status=none ||: # broken pipe -rsync -rplt --include '/*.gz' --exclude '/**' --delete-excluded $BASEFILE_DIR/ "${rpre[@]}"/srv/fai/config/basefiles/ +m rsync -rplt --include '/*.zst' --exclude '/**' --delete-excluded $BASEFILE_DIR/ "${rpre[@]}"/srv/fai/config/basefiles/