From c301babfa52860fb04c1e80fbaec432b28528990 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antoine=20Beaupr=C3=A9?= <anarcat@debian.org> Date: Fri, 28 Jun 2019 14:03:50 -0400 Subject: [PATCH] bring install-like procedures closer to the top --- tsa/howto/new-machine.mdwn | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/tsa/howto/new-machine.mdwn b/tsa/howto/new-machine.mdwn index 341a96c2..4e72fcd1 100644 --- a/tsa/howto/new-machine.mdwn +++ b/tsa/howto/new-machine.mdwn @@ -15,6 +15,19 @@ All commands to be run as root unless otherwise noted. * set a hostname - pick an unused one from the [[doc/naming-scheme]] +* set new root password, and document it + +* swap and tmp + + grep tmpfs /etc/fstab || echo 'tmpfs /tmp tmpfs defaults 0 0' >> /etc/fstab + + ! grep swap /etc/fstab && \ + dd if=/dev/zero bs=1024k count=1024 of=/swapfile && \ + chmod 0 /swapfile && \ + mkswap /swapfile && \ + echo '/swapfile none swap sw 0 0' >> /etc/fstab && \ + swapon -a + * sanitize DNS configuration: grep torproject.org /etc/resolv.conf || echo 'domain torproject.org' >> /etc/resolv.conf @@ -112,19 +125,6 @@ All commands to be run as root unless otherwise noted. ( ! grep '^root:' /etc/aliases && echo 'root: torproject-admin@torproject.org' >> /etc/aliases ) && sed -i -e 's/^root:.*/root: torproject-admin@torproject.org/' /etc/aliases && newaliases -* set new root password, and document it - -* swap and tmp - - grep tmpfs /etc/fstab || echo 'tmpfs /tmp tmpfs defaults 0 0' >> /etc/fstab - - ! grep swap /etc/fstab && \ - dd if=/dev/zero bs=1024k count=1024 of=/swapfile && \ - chmod 0 /swapfile && \ - mkswap /swapfile && \ - echo '/swapfile none swap sw 0 0' >> /etc/fstab && \ - swapon -a - * add to [[nagios]] * document the machine in the evil Google spreadsheet (!) -- GitLab