2 # Copyright (C) 2016 Ian Kelling
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
8 # http://www.apache.org/licenses/LICENSE-2.0
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
16 # for setting up a new machine
17 # usage: $0 [-r] [HOSTNAME]
18 # HOSTNAME changes the machine's hostname
21 # run any sudo command first so your pass is cached
22 # set the scrollback to unlimited in case something goes wrong
25 # send to registrar, glue records:
28 # ns1.iankelling.org 72.14.176.105
29 # ns1.iankelling.org 2600:3c00::f03c:91ff:fe6d:baf8
30 # ns2.iankelling.org 172.105.84.95
31 # ns2.iankelling.org 2a01:7e01::f03c:91ff:feb5:baec
35 # ns1.zroe.org 72.14.176.105
36 # ns1.zroe.org 2600:3c00::f03c:91ff:fe6d:baf8
37 # ns2.zroe.org 172.105.84.95
38 # ns2.zroe.org 2a01:7e01::f03c:91ff:feb5:baec
43 ####### begin setup environment #######
46 ### make ssh interactive shell run better. for when running line interactively line by line
47 sudo bash
-c '/a/exe/ssh-emacs-setup'
49 ##### setup error handling
50 interactive
=true
# set this to false to force set -x
51 [[ $
- == *i
* ]] || interactive
=false
52 if ! $interactive; then
55 source /a
/bin
/errhandle
/err
59 echo 1 >~
/.local
/distro-begin
62 source /a
/bin
/distro-functions
/src
/package-manager-abstractions
65 echo "$0: $(date): starting now)"
69 if [[ $EUID == 0 ]]; then
70 if getent passwd iank || getent passwd ian
; then
71 echo "$0: error: running as root. unprivileged user exists. use it."
74 echo "$0: warning: running as root. I will setup users then exit"
82 if [[ -e /a
/opt
/emacs
]]; then
85 while [[ $1 == -* ]]; do
87 -r) recompile
=true
; shift ;;
88 -e) emacs
=false
; shift ;;
96 ##### variables/env setup
97 script_dir
="$(readlink -f "${BASH_SOURCE[@]}")"; script_dir
=${script_dir%/*}
98 # shellcheck source=./pkgs
99 source $script_dir/pkgs
101 source /a
/bin
/distro-functions
/src
/identify-distros
102 $interactive ||
set -x
103 for f
in kd x2 x3 x8 frodo tp li bk je demohost kw sy bo
; do
104 eval "$f() { [[ $HOSTNAME == $f ]]; }"
106 codename
=$
(debian-codename
)
107 bitfolk
() { je || bk
; }
108 has_wayland
() { has_monitor
&& [[ $codename == buster
]]; }
109 has_x
() { has_monitor
&& [[ $codename != buster
]]; }
110 has_monitor
() { ! vps
; }
111 vps
() { bitfolk || li
; }
112 # linode actually has btrfs now, but we dont do anything with it.
113 has_btrfs
() { ! vps
; }
114 home_network
() { ! vps
&& ! tp
; }
115 has_p
() { ! vps
&& ! tp
; }
116 encrypted
() { ! bitfolk
; }
118 export GLOBIGNORE
="*/.:*/.."
121 sed="sed --follow-symlinks"
123 ####### end setup environment #######
126 ##### begin setup encryption scripts ######
128 # I tried making a service which was dependent on reboot.target,
129 # but it happened too late in the shutdown process.
130 sudo
dd of
=/etc
/systemd
/system
/keyscripton.service
<<'EOF'
132 Description=keyscripton
133 # This is triggered by reboot and when keyscriptoff stops.
135 # tried using graphical.target, but it made my display manager restart before rebooting.
136 # generally, I don't think targets order shutdown like they do startup.
137 # So, I did systemd-analyze plot > something.svg, and picked a reliably started
138 # service that happens late in the game.
140 DefaultDependencies=no
141 # not sure if needed, makes sure we shut down before reboot.target
142 Conflicts=reboot.target
148 ExecStop=/a/exe/keyscript-on
151 WantedBy=keyscriptoff.service
153 sudo systemctl daemon-reload
# needed if the file was already there
154 sudo systemctl
enable keyscripton.service
156 sudo
dd of
=/etc
/systemd
/system
/keyscriptoff.service
<<'EOF'
158 Description=keyscriptoff
162 ExecStart=/a/exe/keyscript-off
165 WantedBy=multi-user.target
167 sudo systemctl daemon-reload
# needed if the file was already there
168 sudo systemctl
enable keyscriptoff.service
169 sudo systemctl start keyscriptoff.service
173 ## /usr/share/doc/dropbear-initramfs/README.initramfs.gz
174 ## claims we need to do this. but it works fine without it.
176 # while read -r m _; do /sbin/modinfo -F filename "$m"; done </proc/modules | \
177 # sed -nr "s@^/lib/modules/$(uname -r)/kernel/drivers/net(/.*)?/([^/]+)\.ko\$@\2@p" \
179 # if ! diff -q /etc/initramfs-tools/modules $tmp &>/dev/null; then
180 # sudo dd if=$tmp of=/etc/initramfs-tools/modules
181 # sudo /usr/sbin/update-initramfs -u -k all
184 ## if we were creating an intall for a different machine needing different modules, we could include them all like this:
185 ## find /lib/modules/*/kernel/drivers/net /lib/modules/*/kernel/net -type f -name '*.ko' -printf "%f\n" | sed 's/.ko$//' | sort -u >/etc/initramfs-tools/modules
187 # this is here to cleanup the leftover from the comments above. remove it eventually.
188 if [[ -s /etc
/initramfs-tools
/modules
]]; then
189 sudo truncate
-s0 /etc
/initramfs-tools
/modules
190 sudo
/usr
/sbin
/update-initramfs
-u -k all
193 # initram auth keys get setup with rootsshsync later on.
194 $script_dir/rootsshsync
196 ### To do a remote unlock: ssh and do this once per crypt disk:
197 # echo -n PASS >/lib/cryptsetup/passfifo
202 ##### end setup encryption scripts ######
205 # disabled until its fixed up
208 # todo, it would be nice to cut down on some of the output
211 #### rerun my fai-time scripts
212 # already ran for pxe installs, but used for vps & updates
213 distro
=$
(distro-name
)
215 ubuntu|debian|trisquel
)
216 sudo bash
-c ". /a/bin/fai/fai-wrapper && /a/bin/fai/fai/config/scripts/IANK/11-iank"
219 sudo bash
-c ". /a/bin/fai/fai-wrapper &&
220 /a/bin/fai/fai/config/distro-install-common/end"
224 ###### setup hostname
225 if [[ $HOSTNAME != $
(cat /etc
/hostname
) ]]; then
226 echo $HOSTNAME > /etc
/hostname
227 hostname
-F /etc
/hostname
229 # office vpn dhcp adds to /etc/resolv.conf search office.fsf.org which
230 # makes that be #1 priority, which makes dnsmasq resolve that for
231 # unqualified hosts first, which means we skip the hosts file. Ya, its
232 # kinda dumb, but it is what it is. There is a dnsmasq config option to
233 # override it too, but this seems simpler.
234 sudo
sed -i --follow-symlinks -f - /etc
/hosts
<<EOF
235 \$a 127.0.1.1 $HOSTNAME.b8.nz $HOSTNAME.office.fsf.org $HOSTNAME
239 ##### exit first stage if running as root
240 if [[ $EUID == 0 ]]; then
241 if [[ ! -e /home
/iank
/.ssh
/authorized_keys
&& ! -L /home
/iank
/.ssh
/authorized_keys
]]; then
242 sudo
-u iank mkdir
-p /home
/iank
/.
ssh
243 chmod 0700 /home
/iank
/.
ssh
244 sudo
-u iank
ln -sf /p
/c
/machine_specific
/vps
/subdir_files
/.ssh
/authorized_keys
/home
/iank
/.
ssh
246 echo "$0: running as root. exiting now that users are setup"
251 #### setup bash for root
252 for x
in /a
/c
/{.bashrc
,brc
,brc2
,.bash_profile
,.profile
,.inputrc
,path_add_function
}; do
260 # convenient to just do all file linking in one place
261 sudo
/a
/exe
/lnf
-T /a
/bin
/b
262 sudo
/a
/exe
/lnf
-T /a
/f
/f
263 sudo
/a
/exe
/lnf
-T /var
/log
/exim4
/el
264 sudo
/a
/exe
/lnf
-T /a
/f
/ans
/c
265 sudo
/a
/exe
/lnf
-T /nocow
/t
/t
267 lnf
-T /p
/News ~
/News
269 dirs=(/q
/root
/q
/root
/.editor-backups
/q
/root
/.undo-tree-history
)
270 sudo mkdir
-p ${dirs[@]}
271 sudo
chmod 600 ${dirs[@]}
272 sudo
/a
/exe
/lnf
/q
/root
/.editor-backups
/q
/root
/.undo-tree-history \
273 /a
/opt
/a
/c
/.emacs.d
$HOME/mw_vars
/k
/backup
/root
274 /a
/bin
/ds
/install-my-scripts
# needed for rootsshsync cronjob
275 sudo
/a
/exe
/lnf
/a
/c
/.vim
/a
/c
/.vimrc
/a
/c
/.gvimrc
/root
279 # vps needs bind group before conflink
286 # this needs to be before installing pacserve so we have gpg conf.
289 if [[ -e /etc
/rootsudoenv
]]; then
290 source /etc
/rootsudoenv
295 ###### bash environment setup
298 source /etc
/profile.d
/environment.sh
299 export LC_USEBASHRC
=t
300 # shellcheck source=./.bashrc
303 $interactive ||
set -x
305 ##### use systemd-resolved for glibc resolutions
309 if [[ ! -L /etc
/nsswitch.conf
]]; then
310 sudo mkdir
-p /etc
/resolved-nsswitch
311 sudo
mv /etc
/nsswitch.conf
/etc
/resolved-nsswitch
312 sudo
ln -sf /etc
/resolved-nsswitch
/nsswitch.conf
/etc
315 f
=/etc
/basic-nsswitch
/nsswitch.conf
316 if [[ ! -e $f ]]; then
317 sudo mkdir
-p ${f%/*}
318 sudo
cp /etc
/nsswitch.conf
$f
319 sudo
sed -i --follow-symlinks 's/^ *hosts:.*/hosts: files dns myhostname/' $f
323 # je should be able to get along systemd-resolved, but ive had some odd
324 # very intermittent dns failures with spamassassin, it seems it might only
325 # be happening with systemd-resolved, so just use unbound
326 # to make it consistent with the other hosts.
327 sudo
sed -i --follow-symlinks 's/^ *hosts:.*/hosts: files dns myhostname/' /etc
/nsswitch.conf
328 soff systemd-resolved
329 sudo
ln -sf 127.0.0.1-resolv/stub-resolv.conf
/etc
/resolv.conf
331 # cautious measure to make sure resolution is working
336 # files mdns4_minimal [NOTFOUND=return] dns myhostname
337 # mdns4 is needed for my printer and for bbb webrtc, not sure exactly why.
338 # https://www.freedesktop.org/software/systemd/man/nss-resolve.html#
339 # seems more important than some potential use case.
340 # Interestingly, t9/t10 man page says use files before resolve, debian 10 says the opposite.
341 # removing files makes hostname -f not actually give the fully qualified domain name.
342 sudo
sed -i --follow-symlinks 's/^ *hosts:.*/hosts: files resolve [!UNAVAIL=return] mdns4_minimal [NOTFOUND=return] myhostname/' /etc
/resolved-nsswitch
/nsswitch.conf
354 "/etc/resolved-nsswitch/nsswitch.conf r,"
355 "/etc/basic-nsswitch/nsswitch.conf r,"
356 # Aug 06 23:09:11 kd audit[3995]: AVC apparmor="DENIED" operation="connect" profile="/usr/bin/freshclam" name="/run/systemd/resolve/io.systemd.Resolve" pid=3995 comm="freshclam" requested_mask="wr" denied_mask="wr" fsuid=109 ouid=101
357 # I dont know if this is quite the right fix, but I saw other sockets
358 # in the nameservice files that were rw, so figured it was ok to add this and it worked.
359 "/run/systemd/resolve/io.systemd.Resolve rw,"
361 f
=/etc
/apparmor.d
/abstractions
/nameservice
362 apparmor_reload
=false
364 for l
in "${lines[@]}"; do
365 if ! grep -qF "$l" $f; then
366 sudo
sed -i "/\/nsswitch.conf/a $l" $f
368 if ! grep -qF "$l" $f; then
369 echo "$0: failed editing $f. investigate"
374 if $apparmor_reload && systemctl is-enabled apparmor
; then
375 m ser reload apparmor
381 if dpkg
-s -- nscd
&>/dev
/null
; then
382 sudo apt-get
-y remove
--purge --auto-remove nscd
383 sudo systemctl stop nscd ||
: # fails if already stopped
386 # http://strugglers.net/~andy/blog/2020/12/03/starting-services-only-when-the-network-is-ready-on-debiansystemd/
387 if systemctl
cat ifupdown-wait-online.service
&>/dev
/null
; then
388 sudo systemctl
enable ifupdown-wait-online.service
392 # remove line like this: 85.119.82.128 je.iankelling.org je
393 # it messes with hostname -f.
394 sudo
sed -ri "/^127\./n;/[[:space:]]$HOSTNAME\$/d" /etc
/hosts
397 if isdeb
&& [[ $
(debian-codename
) == aramo
]]; then
398 sudo
dd of
=/etc
/apt
/preferences.d
/aramo-jammy-missing
<<'EOF'
399 Package: linux-libc-dev libmysqlclient21
400 Pin: release n=jammy,o=Ubuntu
405 # libfdk just has some patent worries.
406 # https://www.gnu.org/licenses/license-list.en.html#fdk
407 if isdeb
&& [[ $
(debian-codename
) == nabia
]]; then
408 sudo
dd of
=/etc
/apt
/preferences.d
/nabia-focal-missing
<<'EOF'
410 Pin: release n=focal,o=Ubuntu
414 # it has a dependency python-paramiko that should be
415 # python3-paramiko. the backport version is pretty close to the normal
416 # version, so i just set the pin priority low for the backport and it
418 sudo
dd of
=/etc
/apt
/preferences.d
/nabia-backport
<<'EOF'
420 Pin: release a=nabia-backports
427 # to test when these become available in trisquel, copy the package list, remove the * chars, repaplace PACKAGES below
428 # for x in PACKAGES; do hr; e $x; if [[ $x == *- ]]; then s="^$x"; dpkg -l "$x*" | sed '0,/^+++/d'; else s="^$x\$"; fi; aptitude search "~O Trisquel ~n $s"; done
431 #### setup firefox backport
432 ## ian: disabled. backports are not being published atm due to rust packaging issue
434 # codename=$(debian-codename)
435 # if isdebian-stable && has_x; then
436 # s dd of=/etc/apt/sources.list.d/mozilla-iceweasel.list <<EOF
437 # deb http://mozilla.debian.net/ $codename-backports firefox-release
438 # deb-src http://mozilla.debian.net/ $codename-backports firefox-release
441 # # take care of mozilla signing errors in previous command
442 # pi pkg-mozilla-archive-keyring
448 ###### arch aur wrapper setup
450 #https://wiki.archlinux.org/index.php/Arch_User_Repository#Installing_packages
451 sudo pacman
-S --noconfirm --needed base-devel jq
452 # pacaur seems to be the best, although it + cower has a few minor bugs,
453 # its design goals seem good, so, going for it.
460 makepkg
-sri --skippgpcheck --noconfirm
469 x
=$
(mktemp
); /usr
/bin
/pacman.conf-insert_pacserve
>$x
470 sudo
dd of
=/etc
/pacman.conf
if=$x; rm $x
471 sudo systemctl
enable pacserve.service
472 sudo systemctl start pacserve.service
476 #### update all packages
480 ###### p1 packages install ######
484 ######## fix evbug bug ######
485 case $
(debian-codename-compat
) in
486 xenial|bionic|focal|jammy
)
487 # noticed in flidas. dunno if it affects any others
488 #https://bugs.launchpad.net/ubuntu/+source/module-init-tools/+bug/240553
489 #https://wiki.debian.org/KernelModuleBlacklisting
490 #common advice when searching is to use /etc/modprobe.d/blacklist.conf,
491 #but that file won't work and will get automatically reverted
492 sudo rmmod evbug ||
: # might not be loaded yet
493 file=/etc
/modprobe.d
/evbug.conf
494 line
="blacklist evbug"
495 if [[ $
(cat $file) != "$line" ]]; then
496 sudo
dd of
=$file status
=none
<<<"$line"
498 sudo update-initramfs
-u
505 #### arch specific early packages
506 case $
(distro-name
) in
508 # pkgfile is like apt-cache
510 sudo pkgfile
--update
515 # enable trim for volume delete, other rare commands
516 sudo
$sed -ri 's/( *issue_discards\b).*/\1 = 1/' /etc
/lvm
/lvm.conf
518 # flidas or so, these units arent built-in
519 if isdeb
&& ! systemctl list-unit-files |
grep ^fstrim.timer
&>/dev
/null
; then
520 sudo
cp /usr
/share
/doc
/util-linux
/examples
/fstrim.
{service
,timer
} /etc
/systemd
/system
523 sudo systemctl
enable fstrim.timer
526 ##### make extra dirs
528 for dir
in /mnt
/{1,2,3,4,5,6,7,8,9} /nocow
/t
; do
529 [[ -e $dir ]] && continue
532 if (( ${#dirs[@]} )); then
533 # mkdir -p on a mounted directory will fail. so will chown if its an ro mount
534 sudo mkdir
-p "${dirs[@]}"
535 sudo chown
$USER:$USER "${dirs[@]}"
539 # disabled temporarily
541 # if home_network; then
542 # tu /etc/fstab <<'EOF'
543 # /i/w /w none bind,noauto 0 0
544 # /i/k /k none bind,noauto 0 0
546 # if ! mountpoint /kr; then
548 # sudo chown $USER:user2 /kr
550 # if [[ $HOSTNAME == frodo ]]; then
551 # tu /etc/fstab <<'EOF'
552 # /k /kr none bind,noauto 0 0
555 # tu /etc/fstab <<'EOF'
556 # frodo:/k /kr nfs noauto 0 0
559 # sudo mkdir -p /i/{w,k}
560 # for dir in /{i,w,k}; do
561 # if mountpoint $dir; then continue; fi # already mounted
563 # sudo chown $USER:$USER $dir
565 # # debian auto mounting of multi-disk encrypted btrfs is busted. It is
566 # # in jessie, and in stretch as of 11/26/2016 I have 4 disks in cryptab,
567 # # based on 3 of those, it creates .device units for /dev/mapper/dev...
568 # # then waits endlessly for them on bootup, after the /dev/mapper disks
569 # # have already been created and exist. todo: create a simple repro
570 # # for this in a vm and report it upstream.
572 # sudo dd of=/root/imount <<'EOF'
574 # [[ $EUID == 0 ]] || exec sudo -E "${BASH_SOURCE[0]}" "$@"
575 # set -eE -o pipefail
576 # trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR
577 # for dir in /i /k /kr /w; do
578 # if ! mountpoint $dir &>/dev/null && \
579 # awk '{print $2}' /etc/fstab | grep -xF $dir &>/dev/null; then
580 # if awk '{print $3}' /etc/fstab | grep -xF nfs &>/dev/null; then
581 # mount $dir || echo "warning: failed to mount nfs on $dir"
588 # sudo chmod +x /root/imount
589 # sudo dd of=/etc/systemd/system/imount.service <<EOF
591 # Description=Mount /i and related mountpoints
592 # Before=syncthing@$USER.service
596 # ExecStart=/root/imount
599 # RequiredBy=syncthing@$USER.service
600 # # note /kr needs networking, this target is the simplest way to
601 # # time it when the network should be up, but not do something
602 # # dumb like delay startup until the network is up. It happens
603 # # at some time after network.target
604 # WantedBy=multi-user.target
606 # sudo systemctl daemon-reload # needed if the file was already there
607 # sudo systemctl enable imount.service
608 # sudo systemctl start imount.service
613 # a nocow dir that is common to multiple distros installed on the same system
616 if ! mountpoint
$dir; then
617 subvol
=/mnt
/root
/nocow
618 if [[ ! -e $subvol ]]; then
619 sudo btrfs subvolume create
$subvol
620 sudo chown root
:1000 $subvol
621 sudo
chattr +C
$subvol
624 first_root_crypt
=$
(awk '$2 == "/" {print $1}' /etc
/mtab
)
626 $first_root_crypt /nocow btrfs noatime,subvol=nocow$( (( $(nproc) > 2)) && echo ,compress=zstd ) 0 0
629 sudo chown
$USER:$USER $dir
638 tu
/etc
/fstab
<<'EOF'
639 /dev/mapper/crypt_dev_ata-Samsung_SSD_870_QVO_8TB_S5VUNG0N900656V-part7 /d btrfs nofail,x-systemd.device-timeout=30s,x-systemd.mount-timeout=30s,noatime,compress=zstd,subvol=d 0 0
640 /d/m /i none bind,compress=zstd 0 0
642 if ! mountpoint
/d
&>/dev
/null
; then
644 if [[ -d /mnt
/r
7/d
]]; then
648 if ! mountpoint
/i
&>/dev
/null
; then
654 tu
/etc
/fstab
<<'EOF'
655 /dev/mapper/crypt_dev_ata-ata-Hitachi_HDS722020ALA330_JK1121YAG7SXWS-part1 /i btrfs nofail,x-systemd.device-timeout=30s,x-systemd.mount-timeout=30s,noatime,subvol=i 0 0
657 if ! mountpoint
/i
&>/dev
/null
; then
659 if [[ -d /mnt
/i
/i
]]; then
667 sudo systemctl disable systemd-networkd
675 # disable crash report annoying dialogs.
676 sudo
dd of
=/etc
/default
/apport
<<<'enabled=0'
679 ##### install laptop hardware packages
680 if tp || x2 || x3 || bo || sy; then
686 # the exact packages that task-laptop would install, since ubuntu
687 # doesn\'t have this virtual in practice package.
688 pi avahi-autoipd bluetooth powertop iw wireless-tools wpasupplicant
690 # todo: other distros unknown
696 # sway not packaged for t9, not bothering to build it yet since
697 # i3 doesnt seem to tear and stutter on video anymore.
698 if [[ $codename == buster ]]; then
704 # no recommends due to this bug: https://trisquel.info/en/issues/26525
705 pi --no-install-recommends i3
708 case $(distro-name) in
709 trisquel|ubuntu|debian)
714 # recommends gets us geoclue (for darkening automatically at night i assume),
715 # which recommends modemmanager, which is annoying to fix for the model01 keyboard.
716 # commented because I dont use it much, and in nabia its named changed to redshift-gtk
717 #pi --no-install-recommends gtk-redshift
719 ##### setup X autostart
720 # install for multiple display managers in case we use one
721 dir=/etc/X11/xinit/xinitrc.d/
723 sudo cp /a/bin/distro-setup/desktop-20-autostart.sh $dir
725 ## disabled since i'm not using gdm atm
727 # sudo mkdir -p $dir/PostLogin
728 # sudo cp /a/bin/distro-setup/desktop-20-autostart.sh $dir/PostLogin/Default
729 sudo mkdir -p /etc/lightdm/lightdm.conf.d
730 # etiona lightdm.log:
731 # [SeatDefaults] is now called [Seat:*], please update this configuration
732 sudo dd of=/etc/lightdm/lightdm.conf.d/12-iank.conf <<'EOF'
734 # display-setup-script=/a/bin/ds/lightdm-start
735 session-setup-script=/a/bin/distro-setup/desktop-20-autostart.sh
739 # originally used xkbcomp, documented in input-setup.sh, this doesnt
740 # work under wayland, but its still useful for creating the config,
741 # then modifying the system files.
742 sudo sed -i.orig '/key *<KPMU> *{/,/}/s/KP_Multiply/underscore/g' /usr/share/X11/xkb/symbols/keypad
744 ##### basic graphical packages
745 pi konsole suckless-tools ssh-askpass
753 # emacs git build was broken last time i checked,
757 makepkg -si --noconfirm
760 pi hunspell hunspell-en
763 /a/bin/buildscripts/emacs
764 /a/bin/buildscripts/mu4e
766 /a/bin/buildscripts/emacs --no-r
767 /a/bin/buildscripts/mu4e --no-r
770 # the first pup command can kill off our /etc/ mod, so rerun this
771 /a/exe/ssh-emacs-setup
774 if [[ $HOSTNAME == kd ]] && ! mountpoint /d &>/dev/null; then
776 # if this is a fresh reinstall, need to run something like this
779 btrbk archive /mnt/rust1/btrbk /mnt/r7/btrbk
780 btrfs sub snap /mnt/r7/btrbk/LATEST /mnt/r7/d
786 echo 0 >~/.local/distro-begin
787 echo "$0: $(date): ending now"
788 echo "exiting with status 0"