X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=fai%2Fconfig%2Fscripts%2FIANK%2F11-iank;h=99316b84f0f376ad0568537044b66b8be241f12d;hb=fd92920315ea1ec28049041f74011324c750c667;hp=54641b237bcc10b15b30b90bb0f8b662253f8609;hpb=a03d1a5cf4c6583c075a5b80e729f8f72ed0d338;p=automated-distro-installer diff --git a/fai/config/scripts/IANK/11-iank b/fai/config/scripts/IANK/11-iank index 54641b2..99316b8 100755 --- a/fai/config/scripts/IANK/11-iank +++ b/fai/config/scripts/IANK/11-iank @@ -24,6 +24,9 @@ if [[ $EUID != 0 ]]; then exit 1 fi +# ignore this line. hack to make shellcheck ignore $target +if [[ ! $target ]]; then target=; fi + if ! type -t fcopy &>/dev/null; then sudo apt-get -y install fai-client fi @@ -185,12 +188,17 @@ EOF dns=systemd-resolved EOF - $FAI/distro-install-common/ethusb-static + + if [[ ! $FAI_WRAPPER || $SSH_CLIENT ]]; then + # for running from fai or remote connections, don't kill the internet + ethusb_arg=-c + fi 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 + # we are at_home + $FAI/distro-install-common/ethusb-static $ethusb_arg else - $FAI/distro-install-common/ethusb-nm + $FAI/distro-install-common/ethusb-static off $ethusb_arg fi @@ -222,6 +230,7 @@ fi if ifclass LINODE; then mkdir -p $target/etc/initramfs-tools/conf.d + # shellcheck disable=SC2154 # comes with LINODE environment cat >$target/etc/initramfs-tools/conf.d/mine <&1 | grep -Fx "Status: install ok installed" &>/dev/null; then + apt-get -y install wget + wget -O /target/tmp/x.deb https://linux-libre.fsfla.org/pub/linux-libre/freesh/pool/main/f/freesh-archive-keyring/freesh-archive-keyring_1.1_all.deb + $ROOTCMD dpkg -i /tmp/x.deb + $ROOTCMD apt-get update + $ROOTCMD apt-get -y install linux-libre + fi ;; esac