
Show HN: Beginning, a work-in-progress init system - Somasis
https://github.com/Somasis/beginning
======
Somasis
Hi HN, I've been working on this for a while and I was looking for some
feedback on it. I've been using it on my laptop, servers, etc. without issues
for a few months.

~~~
vezzy-fnord
Not bad. It's another BSD rc.d-like, which is a rather minimal yet very clean
architecture. It doesn't quite approach the terseness of rc.subr(5) with the
initscripts that practically become key-value pairs, however. It's nice for
minimalists like us, but also for most people wouldn't be compelling in
comparison to OpenRC. Being entirely Bash-driven would is also unfortunately a
death knell for promoting it as a modern replacement.

~~~
Somasis
OpenRC was actually what I tried before making this, but my experience with it
is part of what resulted in the creation of Beginning. It wanted to be a
modern replacement for sysvinit and such, but ended up taking a lot of
sysvinit's cruft and, in my opinion, ends up being too complex for what I
wanted it for.

I'm not sure I agree with the comment about it being Bash-driven, though. I
chose bash because it's readily available and had been proven to work fine
from what systems I studied (namely OpenBSD and Arch Linux's initscripts).
Being a modern replacement is not what I'm looking for, I just want to make
something different that doesn't needlessly complicate.

------
JdeBP

      #!/bin/bash
      #!/bin/bash
      #!/bin/bash
    

One of the major improvements to System 5 rc on Linux in the past couple of
decades came not from adjusting configuration mechanisms (e.g. r2d2, file-rc)
or helper script function libraries. It came from the simple realization that
the Bourne Again shell was a quite heavyweight choice for running a lot of
non-interactive scripts.

* [https://wiki.ubuntu.com/DashAsBinSh](https://wiki.ubuntu.com/DashAsBinSh)

* [https://wiki.debian.org/BootProcessSpeedup#Using_a_faster_sy...](https://wiki.debian.org/BootProcessSpeedup#Using_a_faster_system_shell)

* [http://initscripts-ng.alioth.debian.org/soc2006-bootsystem/b...](http://initscripts-ng.alioth.debian.org/soc2006-bootsystem/bootcharts.html)

------
JdeBP

       HWCLOCK_TZ=$(readlink /etc/localtime | cut -d/ -f5-)
    

One of the improvements to BSD /etc/rc.conf{,.local} pioneered by OpenBSD 5.6
is that they are no longer shell scripts, but are simple lists of name=value
pairs, that can thus be parsed, used, and maintained by things other than just
shell script interpreters.

OpenBSD also gained an rcctl command, where one could run (say) "rcctl enable
salt_master" and it would adjust the rc.conf files to enable the salt_master
service. nosh has a shim for it.

* [http://www.openbsd.org/faq/upgrade56.html#OtherChanges](http://www.openbsd.org/faq/upgrade56.html#OtherChanges)

* [http://undeadly.org/cgi?action=article&sid=20140820090351](http://undeadly.org/cgi?action=article&sid=20140820090351)

