-
-$new_shell bash -s <<'EOF'
-set -eE
-if mountpoint /m; then sudo umount /m; fi
-if mountpoint /o; then sudo umount /o; fi
-EOF
-
-# if new_host is not on home network, make mail.iankelling.org not resolve
-# on the home network.
-if [[ $new_host == $HOSTNAME ]] && ! $at_home; then
- echo | $wrt_shell cedit mail_host /etc/hosts || [[ $? == 1 ]] # 1 means file changed.
-else
- $wrt_shell bash -s <<EOFOUTER
- if ! cedit mail_host /etc/hosts <<EOF; then
-\$(grep "\b$new_host\b" /etc/hosts | awk '{print \$1}') mail.iankelling.org
-EOF
-/etc/init.d/dnsmasq restart
-EOFOUTER
-fi
-
-
-$old_shell /a/bin/distro-setup/install-my-scripts
-$old_shell primary-setup $new_host
-
-sudo dd of=/etc/btrbk.conf <<'EOF'
-ssh_identity /root/.ssh/home
-# Just a guess that local7 is a good facility to pick.
-# It's a bit odd that the transaction log has to be logged to
-# a file or syslog, while other output is sent to std out.
-# The man does not mention a way for them to be together, but
-# I dunno if setting a log level like warn might also output
-# transaction info.
-transaction_syslog local7
-
-# so we only run one at a time
-lockfile /var/lock/btrbk.lock
-
-# default format of short does not accomidate hourly preservation setting
-timestamp_format long-iso
-
-# only make a snapshot if things have changed
-snapshot_create onchange
-# I could make this different from target_preserve,
-# if one disk had less space.
-# for now, keeping them equal.
-snapshot_preserve 36h 14d 8w 24m
-snapshot_preserve_min 4h
-snapshot_dir btrbk
-
-# so, total backups = ~89
-target_preserve 36h 14d 8w 24m
-target_preserve_min 4h
-
-# if something fails and it's not obvious, try doing
-# btrbk -l debug -v dryrun