Skip to Content [alt-c]

Comment

In reply to Comment by Anonymous

Anonymous on 2016-10-06 at 08:47:

wouldn’t it be enough to have a simple syntax which can do everything systemd init syntax can?

Something like this?

MOUNTPOINT=/sys/fs/fuse/connections depend() { need localmount } start() { ebegin "Starting fuse" if ! grep -qw fuse /proc/filesystems; then modprobe fuse >/dev/null 2>&1 || eerror $? "Error loading fuse module" fi if grep -qw fusectl /proc/filesystems && \ ! grep -qw $MOUNTPOINT /proc/mounts; then mount -t fusectl none $MOUNTPOINT >/dev/null 2>&1 || \ eerror $? "Error mounting control filesystem" fi eend ${?} } stop() { ebegin "Stopping fuse" if grep -qw $MOUNTPOINT /proc/mounts; then umount $MOUNTPOINT >/dev/null 2>&1 || \ eerror $? "Error unmounting control filesystem" fi eend ${?} }

That’s the syntax of OpenRC. You’ll notice the declarative dependencies along with the simple scripting in start() and stop().

And since it’s a scripting language, the answer to "can it do everything systemd can" is simply: Yes, it can.

A simple standard along with some convenience functions and building on existing tools already provides most of the functionality of systemd.

Reply

Post a Reply

Your comment will be public. If you would like to contact me privately, please email me. Please keep your comment on-topic, polite, and comprehensible.

(Optional; will be published)

(Optional; will not be published)

(Optional; will be published)

  • Blank lines separate paragraphs.
  • Lines starting with ">" are indented as block quotes.
  • Lines starting with two spaces are reproduced verbatim.
  • Text surrounded by *asterisks* is italicized.
  • Text surrounded by `back ticks` is monospaced.
  • URLs are turned into links.
  • Use the Preview button to check your formatting.