die "${problem}; nothing has been built. Rerun the installer once the release's assets download, free space on ${mount}, or set FELIS_PREFLIGHT=warn to build anyway"
}
# stop_docker hands back the ~150 MiB the docker daemon holds once a step is done with it; the
# next step that builds starts it again. A Docker this run never started is left alone.
# stop_docker hands back what Docker holds once a step is done with it, ~150 MiB for the daemon
# and ~45 MiB for its containerd; the next step that builds starts both again. A Docker this run
# never started is left alone, and so is a containerd holding any namespace besides Docker's own
# (moby, moby_history): something else on the host runs on it. k3s's containerd listens on a
# socket of its own and is never the one asked here.
expect "a Docker the installer brings is started without a place at boot""INSTALL apt
SYSTEMCTL disable docker.service docker.socket
SYSTEMCTL disable containerd.service
SYSTEMCTL start docker""$out"
case"$out"in*enable*)echo"FAIL the installed Docker was enabled at boot";fails=$((fails +1));;*)echo"PASS the installed Docker is not enabled at boot";;esac
out="$(run_id 0 1)"
expect "a Docker installed beside an existing containerd leaves that containerd's boot alone""INSTALL apt
SYSTEMCTL disable docker.service docker.socket
SYSTEMCTL start docker""$out"
out="$(run_id 1 1)"
expect "a Docker already on the host is only started""OK: docker already installed
SYSTEMCTL start docker""$out"
case"$out"in*disable*|*enable*)echo"FAIL the host's own Docker had its boot changed";fails=$((fails +1));;*)echo"PASS the host's own Docker keeps its boot setting";;esac
# --- a release binary is hashed against SHA256SUMS before anything runs it ---------------
# download_release_binary executes the asset as root to read its version stamp, so the
# checksum has to come first, and every failure has to fall back to the source build.