0

I'd like to know whether there are any Systemd equivalents for *BSD distributions, basically something that can handle dependencies between services (service A requires B to be started, so until B is ready don't start A) and has a sane service file format (like a configuration file that tells it what to start and when, instead of an initscript).

After using it on Linux I can't even think of going back to a legacy initscripts-based distribution, and yet I'd like to try a BSD (I need a very minimal system for a router & access point).

1

FreeBSD's init system has dependency. Please check man rcorder:

The rcorder utility is designed to print out a dependency ordering of a set of interdependent files. Typically it is used to find an execution sequence for a set of shell scripts in which certain files must be executed before others.

If your service isn't too complicated then its rc-script would simple too. If your service is complicated, the systemd unit file will be complicated too. See the rc.d scripting documentation:

#!/bin/sh

. /etc/rc.subr

name=mumbled
rcvar=mumbled_enable

command="/usr/sbin/${name}"

load_rc_config $name
run_rc_command "$1"

I think it's not complicated. More details see the documentations!

| improve this answer | |
1

FreeBSD gives you a nice simple way to do this in the rc.d scripts.

Look at man rc. You'll see how the order is worked out. In essence, you state what service a script provides, and which services it needs to be running first. Here's an example:

#!/bin/sh
#
# PROVIDE: foo
# REQUIRE: bar_service_required_to_precede_foo

The rest should happen automagically.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.