2 ms·
As much as I really really dislike systemd, bash is not the answer. I think we should try to do something better, I’m certain nobody will agree on a good langu
by dijit 4y ago
As much as I really really dislike systemd, bash is not the answer.
I think we should try to do something better, I’m certain nobody will agree on a good language to use but I might propose starlark (a dialect of python, which recently got a rust implementation of the language thanks to Facebook).
I should add: I’m quite adept at bash (I have the LinkedIn skill badge! (This is a joke)) but I can agree with people who dislike it, there are too many edge cases, it’s not easy to understand and while expressive and powerful: evidently we should have something that is easy too.
- dsr_ 4y agoFirst, there's no requirement to use bash. Any shell that has an exec equivalent and can redirect stderr to stdout will work. There's not even a requirement for it to be a script -- daemontools-style supervisors don't parse the run program, they execute it. It's pretty convenient to use the setuidgid tool, though. So if you want to run starlark, or oil, or your favorite lisp dialect, go ahead. In summation: bash isn't the problem here.
- dijit 4y agoThat's a really good point actually; Nothing prevents us using alternative interpreters for rc.d, ones with hooks for process supervision, hooks for something akin to cgroups, centralised logging and so on. But as a user who makes init scripts: you can do anything, which is pretty liberating when you really think about it.