wipe=true
fi
+if ((`nproc` > 2)); then
+ mopts=,compress=zstd
+fi
declare -A disk_excludes
if ! ifclass USE_MOUNTED; then
else
# note, fai creates the mountpoints listed here
cat > /tmp/fai/fstab <<EOF
-$first_root_crypt / btrfs noatime,subvol=root_$DISTRO 0 0
-$first_root_crypt /mnt/root btrfs nofail,noatime,subvolid=0 0 0
+$first_root_crypt / btrfs noatime,subvol=root_$DISTRO$mopts 0 0
+$first_root_crypt /mnt/root btrfs nofail,noatime,subvolid=0$mopts 0 0
$first_boot_dev /boot btrfs nofail,noatime,subvol=$boot_vol 0 0
$first_boot_dev /mnt/boot btrfs nofail,noatime,subvolid=0 0 0
EOF
# these get copied in an earlier stage by fai, but leaving it here since
# I run this as a single post-fai script to update things that have changed.
tmpfile1=$(mktemp)
-chroot $FAI_ROOT /usr/bin/apt-cache policy >$tmpfile1
+# this can fail if we need an apt update
+chroot $FAI_ROOT /usr/bin/apt-cache policy >$tmpfile1 ||:
fcopy -riBM /etc/apt
tmpfile2=$(mktemp)
chroot $FAI_ROOT /usr/bin/apt-cache policy >$tmpfile2
if $fsf; then
wait_cmd="ssh tarantula.office.fsf.org tail -n0 -f /var/log/syslog"
else
- wait_cmd="ssh wrt logread -f"
+ wait_cmd="ssh cmc logread -f"
fi
wait_count=$1
if [[ $host ]]; then
else
e "updating dnsmasq.conf:"
m $cmd
- ${cmd:-:}|ssh wrt "dd of=/etc/dnsmasq-dhcpopts.conf; /etc/init.d/dnsmasq reload
+ ${cmd:-:}|ssh cmc "dd of=/etc/dnsmasq-dhcpopts.conf; /etc/init.d/dnsmasq reload
$([[ $type == arch || $type == parabola ]] && echo archlike-pxe-mount)"
fi
}
option src wan
option src_dport 2202
option dest_port 22
- option dest_ip $l.8
+ option dest_ip $l.2
option dest lan
config rule
option src wan
option src wan
option src_dport 80
option dest lan
- option dest_ip $l.8
+ option dest_ip $l.2
option proto tcp
config rule
option src wan
option src wan
option src_dport 443
option dest lan
- option dest_ip $l.8
+ option dest_ip $l.2
option proto tcp
config rule
option src wan
case $hostname in
cmc)
v cedit host /etc/hosts <<EOF || dnsmasq_restart=true
-$l.1 $hostname b8.nz
-$l.2 kd
+$l.1 $hostname
+$l.2 kd b8.nz
#$l.3 frodo
$l.4 wrt2
$l.5 x2 faiserver