# 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
rsync -rlpt /q/root/shadow /q/root/luks "${rpre[@]}"/srv/fai/config/distro-install-common
fi
-rsync -rlpt --delete /a/opt/btrfs-progs-release "${rpre[@]}"/srv/fai/config/distro-install-common
+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
[main]
dns=systemd-resolved
EOF
+
+ $FAI/distro-install-common/ethusb-static
+ if [[ $(dig +short @10.2.0.1 -x 10.2.0.2 2>&1 ||:) == kd.b8.nz. ]] \
+ && ip n show 10.2.0.1 | grep . &>/dev/null; then
+ : # we are at home. note: logic duplicated in btrbk-run
+ else
+ $FAI/distro-install-common/ethusb-nm
+ fi
+
+
else
cat > $target/etc/network/interfaces <<-EOF
# generated by FAI