Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's not a DSL, that's a shell script. As for what `pexp="..."` does - it's just setting the pexp variable. If you'd like to know what that does, you can just look up the bash source of `/etc/rc.d/rc.subr`, another bash script.

No DSL knowledge required, at all. Just shell knowledge, and the willingness to look at sourced shell scripts.



> If you'd like to know what that does, you can just look up the bash source of `/etc/rc.d/rc.subr`, another bash script.

Ouch... Shell (or Bourne Shell to be exact), not bash.

Bash is a type of Shell and it's not* even available (thank goodness) on either of the BSDs in their base system (only as a port and/or package).

On OpenBSD, the actual command line interpreter is actually Korn, not the Bourne, Shell.


I mean, I know that it sets a variable, I can't even guess what are the effect of setting that variable.

And "look at the source" is a sad answer, no matter if the source is a shell script or C program.

The point is that with your example you need domain knowledge, knowing bash is not enough: what does the pexp assignment do, what rc_reload=NO means, should flags be specified in the daemon variable or that's meant to only contain the binary, does that path be full or it takes in consideration a standard PATH?

And now you got two things to know: the bash (or even strictly posix sh) language (which, admittedly, isn't the best one in the world) and the domain specific functions/variables.

This isn't much different than with systemd: the language is much more simple and far less surprising being INI-like (the same as .desktop files), and it's basically just setting a list of rather well documented variables.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: