PEBKAC prevention with s6-rc

From: Casper Ti. Vector <caspervector_at_gmail.com>
Date: Thu, 28 Sep 2017 17:16:52 +0800

Yesterday I finally decided to investigate the occasional broken pipe
errors with `s6-rc-update' on my machines, and realised that I always
used it the wrong way:
# rm -rf /etc/s6-rc/db/main # Which /etc/s6-rc/compiled links to.
# s6-rc-compile /etc/s6-rc/db/main /etc/s6-rc/main
# s6-rc-update /etc/s6-rc/compiled
So s6-rc-update ran with the incorrect assumption that the old database
was at /etc/s6-rc/compiled, resulting in all kinds of hilarity.

This is certainly an inexcusable PEBKAC; however, the cause was not
really obvious from the error output of the s6-rc programs. So perhaps
we can make the error messages more indicative; or if that requires too
much additional complexiy, emphasise in the s6-rc documentation that the
service db is not supposed to change throughout its lifetime (including
that last `s6-rc-update' invocation that would replace it; and except
that a major upgrade of s6-rc might require an in-place rebuild)?

-- 
My current OpenPGP key:
RSA4096/0x227E8CAAB7AA186C (expires: 2020.10.19)
7077 7781 B859 5166 AE07 0286 227E 8CAA B7AA 186C
Received on Thu Sep 28 2017 - 09:16:52 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC