On Sun, Jun 16, 2024, 7:01 PM Alexis <flexibeast@gmail.com> wrote:
"Greg A. Woods" <woods@robohack.ca> writes:

> At Sun, 16 Jun 2024 15:48:15 +1000, Alexis
> <flexibeast@gmail.com>
> wrote:
> Subject: [TUHS] Re: Version 256 of systemd boasts '42% less Unix
> philosophy' The Register
>>
>> Here's an excerpt from something i wrote
>> on the Gentoo forum back in April:
>>
>> > [[...]] the situation on
>> > Linux was a mess. Many of the (usually
>> > volunteers) who maintain packages for
>> > Linux don't want to have to learn the
>> > complexities of shell scripting and the
>> > subtle issues that can arise
>
> That pretty much says it all about the state of the GNU/linux
> world
> right there.
>
> In the "Unix world" everyone learns shell scripting, some better
> than
> others of course, and some hate it at the same time too, but I
> would
> say
> from my experience it's a given.  You either learn shell
> scripting or
> you are "just a user" (even if you also write application code).

i feel this comment is unfair.

The specific thing i wrote was:

> the _complexities_ of shell scripting and the _subtle issues_
> that can arise

[emphasis added]

The issue isn't about learning shell scripting _per se_. It's
about the extent to which _volunteers_ have to go beyond the
_basics_ of shell scripting to learn about the _complexities_ and
_subtle issues_ involved in using it to provide _robust_ service
management. Including learning, for example, that certain
functionality one takes for granted in a given shell isn't
actually POSIX, and can't be assumed to be present in the shell
one is working with (not to mention that POSIX-compatibility might
need to be actively enabled, as in the case of e.g. ksh, via
POSIXLY_CORRECT).

Here's a FreeBSD thread from 2014, about how service(8) wasn't
providing the same environment to scripts that boot did:

  https://lists.freebsd.org/pipermail/svn-src-head/2014-July/060519.html

i'm a BSD user as well as a Linux user - i've been maintaining
OpenBSD servers for several years. i certainly have my own
criticisms of Linux versus OpenBSD - for example, i'm, mm, 'not a
fan' of the somewhat cavalier attitude towards documentation that
can often be found in the Linux world, so i'm grateful for people
like Alejandro Colomar and his extensive work on the Linux
man-pages project. But i feel the above thread suggests that
either the FreeBSD devs are clueless about shell scripting or - as
i feel is actually the case - that service management via shell
scripting isn't as straightforward as one might assume.

"Exactly the same" turned out to be harder than one would naively assume. That thread, and others like it elsewhere, hammered out what the differences were and how to fix them. The thread you found is the internal one used to point out issues from changes made... and was 10 years ago...

FreeBSD developers, as a whole, are quite adept at shell acripting and the myriad of subtle issues around it. Every time I've committed something that missed one or more of the relevant ones,  I've got email.... sometimes, though, it takes a village to know all the subtly in play. It's been 25 or more years since it all could be done by one brilliant person... 

Warner


Alexis.