- echo "$0: updating dnsmasq.conf:"
- $cmd
- ${cmd:-:}|ssh wrt "cedit pxe /etc/dnsmasq.conf || /etc/init.d/dnsmasq restart
+ if $fsf; then
+ if [[ ! $cmd ]]; then
+ e "removing pxe for $host on tarantula"
+ ssh tarantula.office.fsf.org bash -e <<EOF
+sed -ri 's/^( *host +$host *\{).*/\1/' /etc/dhcp/dhcpd.conf
+systemctl restart isc-dhcp-server
+EOF
+ elif [[ $cmd == fai ]]; then
+ e "adding pxe for $host on tarantula"
+ ssh tarantula.office.fsf.org bash -e <<EOF
+sed -ri 's/^( *host +$host *\{).*/\1 next-server faiserver.office.fsf.org; filename "pxelinux.0";/' /etc/dhcp/dhcpd.conf
+systemctl restart isc-dhcp-server
+EOF
+ fi
+ else
+ e "updating dnsmasq.conf:"
+ m $cmd
+ ${cmd:-:}|ssh cmc "dd of=/etc/dnsmasq-dhcpopts.conf; /etc/init.d/dnsmasq reload