diff --git a/install.sh b/install.sh index d992616..8657b7f 100755 --- a/install.sh +++ b/install.sh @@ -242,7 +242,15 @@ echo "Configuring Bitwarden SSH agent..." # Group membership takes effect at next login (newgrp would start an interactive shell) sudo usermod -aG docker $USER sudo systemctl enable docker.service -sudo systemctl start docker.service +# Docker needs kernel modules (overlay, bridge, netfilter). If this install +# upgraded the kernel, the running kernel's are gone until a reboot (as in +# updates.d/99-reboot-check.sh), so Docker can't start yet: it starts after +# the reboot the install ends with. +if [ -d "/usr/lib/modules/$(uname -r)" ]; then + sudo systemctl start docker.service +else + echo "Docker will start after you reboot: this install upgraded the kernel." +fi # Enable and start Tailscale daemon if ! systemctl is-enabled tailscaled &> /dev/null; then diff --git a/smoketest/lib/scenario.sh b/smoketest/lib/scenario.sh index 85ef55d..ab327e9 100644 --- a/smoketest/lib/scenario.sh +++ b/smoketest/lib/scenario.sh @@ -163,7 +163,9 @@ run_in_vm() { progress_ticker() { local start=$SECONDS tick="${SMOKETEST_TICK:-60}" last while sleep "$tick" > /dev/null 2>&1 3>&-; do - last="$(tail -c 4096 "$2" | tr '\r' '\n' | grep -v '^[[:space:]]*$' | tail -n 1 | cut -c 1-100)" + # -a: a log can hold binary bytes (a progress bar's), and grep would + # otherwise print "binary file matches" instead of the line + last="$(tail -c 4096 "$2" | tr '\r' '\n' | grep -av '^[[:space:]]*$' | tail -n 1 | tr -cd '[:print:]' | cut -c 1-100)" echo " still running $1 ($(( (SECONDS - start) / 60 )) min)${last:+: $last}" done }