# -q = quiet
journalctl --since=now -qn2 -f -u "$unit_name" &
jr_pid=$!
- # sleep 1 is too fast for x200
- sleep 3
+ # sleep 1 is too fast for x200. sleep 3 was too fast for a fast computer.
+ sleep 4
$sdrun_prefix systemd-run $sdrun_args --unit "$unit_name" --wait --collect "$cmd" "$@" || ret=$?
# The sleep lets the journal output its last line
# before the prompt comes up.
done
}
-mmdebstrap-ecne-noble-missing() {
+ecne-noble-get-missing() {
local prefix ecne noble
prefix=/var/lib/apt/lists/archive.
noble=$(echo ${prefix}ubuntu.com_ubuntu_dists_noble{,-security,-updates}_{main,universe}_binary-amd64_Packages)
update-ecne-missing() {
mkc /t/mmchroot
- mmdebstrap-ecne-noble-missing
+ ecne-noble-get-missing
cp prefs /b/fai/fai/config/files/etc/apt/preferences.d/ecne-missing/ECNE
s cp prefs /etc/apt/preferences.d/ecne-missing
}
deb http://archive.trisquel.org/trisquel/ ecne main
deb http://archive.ubuntu.com/ubuntu/ noble main universe
EOF
- mmdebstrap-ecne-noble-missing
+ ecne-noble-get-missing
# normal sudo can't handle newlines in args
cat >mmdebstrap-cm <<EOF
fi
first_root_crypt=$(awk '$2 == "/" {print $1}' /etc/mtab)
+
+ mopts=
+ if (( $(nproc) > 2)); then
+ mopts+=,compress=zstd
+ fi
+ if grep -qF ,nodiscard,flushoncommit /etc/fstab; then
+ mopts+=,nodiscard,flushoncommit
+ fi
+
sudo /a/exe/teeu /etc/fstab <<EOF
-$first_root_crypt /nocow btrfs noatime,subvol=nocow$( (( $(nproc) > 2)) && echo ,compress=zstd ) 0 0
+$first_root_crypt /nocow btrfs noatime,subvol=nocow$mopts 0 0
EOF
sudo mkdir -p $dir
sudo chown $USER:$USER $dir
# strangely, mount will return success if the device in fstab does not
# exist. Here, we catch that.
mountpoint -q $1
- }
+}
case $HOSTNAME in
$d_host)
sudo /a/exe/teeu /etc/fstab <<'EOF'
fi
+cat <<'EOF'
+
+if we are at home and this is a fresh install, consider running:
+
+/a/bin/fai/fai/config/distro-install-common/ethusb-static
+
+Or, automatically with:
+
+if [[ $(timeout 1 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
+ $FAI/distro-install-common/ethusb-static
+else
+ $FAI/distro-install-common/ethusb-static off
+fi
+EOF
+
echo 0 >~/.local/distro-begin
echo "$0: $(date): ending now"
echo "exiting with status 0"
+
exit 0
if (( $(nproc) > 2)); then
mopts+=,compress=zstd
fi
+ if grep -qF ,nodiscard,flushoncommit /etc/fstab; then
+ mopts+=,nodiscard,flushoncommit
+ fi
+
fstab <<EOF
$crypt_dev /a btrfs noatime,subvol=a$mopts 0 0