News for hackers. Stuff that matters.
Re:Why is Debian the way it is? by SoftTalker on Sunday October 08, 2023 @01:22PM (#37812486)
Have you looked at OpenBSD?

Here's the /etc/rc.d/sshd:

  #!/bin/ksh
  #
  # $OpenBSD: sshd,v 1.7 2022/08/29 19:14:25 ajacoutot Exp $

  daemon="/usr/sbin/sshd"

  . /etc/rc.d/rc.subr

  pexp="sshd: ${daemon}${daemon_flags:+ ${daemon_flags}} \[listener\].*"

  rc_configtest() {
          ${daemon} ${daemon_flags} -t
  }

  rc_cmd $1
Pretty much any service/daemon is similar. You define a few things and you're done.
Re:Why is Debian the way it is? by abenga on Sunday October 08, 2023 @01:41PM (#37812655)
A declarative unit file is still more readable for me.
Re:Why is Debian the way it is? by unixhero on Sunday October 08, 2023 @01:52PM (#37812780)
Why in the world korn shell?

I stumbled upon an auditor with programming skills, who did all his scripting in Korn shell. To me it was like he was from another planet.

Re:Why is Debian the way it is? by SoftTalker on Sunday October 08, 2023 @02:26PM (#37813099)
It's the standard shell on OpenBSD.
Re:Why is Debian the way it is? by Aeolos on Sunday October 08, 2023 @02:18PM (#37813032)
Here is the systemd unit for comparison:

  [Unit]
  Description=OpenBSD Secure Shell server per-connection daemon
  After=auditd.service

  [Service]
  EnvironmentFile=/etc/default/ssh
  ExecStart=/usr/sbin/sshd -i $SSHD_OPTS
  StandardInput=socket
I leave it to the reader to decide which of those two is easier to understand and maintain.
Re:Why is Debian the way it is? by SoftTalker on Sunday October 08, 2023 @02:32PM (#37813139)
Debatable, but I was mainly reacting to "... rc.d / BSD style init scripts. It was awful. You had all these copy-pasted shell scripts with various gaps in functionality depending on who wrote them."

Simply not true in (modern) BSDs, well at least OpenBSD; I'm not familiar with the others.

Re:Why is Debian the way it is? by dietrichepp on Sunday October 08, 2023 @11:14PM (#37816567)
Yeah, maybe it’s not inconsistent any more. But meanwhile, systemd has gotten really nice, even a good version of rc.d seems awful by comparison.

I had the same feeling when Apple came out with launchd in 2005. It felt like such a massive improvement over the existing state of things. Systemd also feels like a massive improvement.