minor fixes and improvements
authorIan Kelling <iank@fsf.org>
Tue, 24 Nov 2020 19:00:19 +0000 (14:00 -0500)
committerIan Kelling <iank@fsf.org>
Tue, 24 Nov 2020 19:00:19 +0000 (14:00 -0500)
fai/config/hooks/partition.DEFAULT
fai/config/scripts/GRUB_PC/11-iank
pxe-server
wrt-setup-local

index ebd38667c418824240cd7bb96bebb24d2a54949d..7c88c7492a8b808ceeb52eaf0c3eb25b87260c47 100755 (executable)
@@ -153,6 +153,9 @@ else
   wipe=true
 fi
 
   wipe=true
 fi
 
+if ((`nproc` > 2)); then
+  mopts=,compress=zstd
+fi
 
 declare -A disk_excludes
 if ! ifclass USE_MOUNTED; then
 
 declare -A disk_excludes
 if ! ifclass USE_MOUNTED; then
@@ -584,8 +587,8 @@ EOF
 else
   # note, fai creates the mountpoints listed here
   cat > /tmp/fai/fstab <<EOF
 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
 $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
index 1849d60299660a467be6e79cfd3257d6be068638..7cb6a0342877a3565793b63f33ebde54c94cdc53 100755 (executable)
@@ -53,7 +53,8 @@ fi
 # 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)
 # 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
 fcopy -riBM /etc/apt
 tmpfile2=$(mktemp)
 chroot $FAI_ROOT /usr/bin/apt-cache policy >$tmpfile2
index d40751e811ffb90601854d14eda312bc92694bfb..3623cc848230b1d25ae87618db4d7403797659bc 100755 (executable)
@@ -163,7 +163,7 @@ ack-wait() {
   if $fsf; then
     wait_cmd="ssh tarantula.office.fsf.org tail -n0 -f /var/log/syslog"
   else
   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
   fi
   wait_count=$1
   if [[ $host ]]; then
@@ -203,7 +203,7 @@ EOF
   else
     e "updating dnsmasq.conf:"
     m $cmd
   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
 }
 $([[ $type == arch || $type == parabola ]] && echo archlike-pxe-mount)"
   fi
 }
index 17fb9d2adb4ff915f94f5e33aaa0f64b2e9a12b8..4cad00c1797158040c6ec1f66dc90d9a321eaf70 100755 (executable)
@@ -483,7 +483,7 @@ config redirect
  option src              wan
  option src_dport        2202
  option dest_port        22
  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 dest             lan
 config rule
  option src              wan
@@ -571,7 +571,7 @@ config redirect
  option src              wan
  option src_dport        80
  option dest             lan
  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 proto            tcp
 config rule
  option src              wan
@@ -584,7 +584,7 @@ config redirect
  option src              wan
  option src_dport        443
  option dest             lan
  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
  option proto            tcp
 config rule
  option src              wan
@@ -677,8 +677,8 @@ EOF
 case $hostname in
   cmc)
     v cedit host /etc/hosts <<EOF || dnsmasq_restart=true
 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
 #$l.3 frodo
 $l.4 wrt2
 $l.5 x2 faiserver