What are the current challenges porting dinit to *BSD as the PID 1 init system? #452
-
I'm going to port this project to NetBSD as an alternative init system to its legacy init program. I'm curious about what are the current issues when running dinit on BSDs. |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 7 replies
-
Hi. Start by reading |
Beta Was this translation helpful? Give feedback.
-
Currently I've successfully run dinit as pid 1 init system thanks to efforts of packaging by @iMilnb . I wrote some minimal service configs and it worked. I'm going to take further research into its advanced features and test their functionalities. |
Beta Was this translation helpful? Give feedback.
-
@MahnoKropotkinvich nice! FYI I did a bit of work in that direction with my pet-project here: https://github.com/NetBSDfr/smolBSD/tree/main/service/systembsd/etc |
Beta Was this translation helpful? Give feedback.
-
@iMilnb Thanks for sharing! Will have a try. |
Beta Was this translation helpful? Give feedback.
-
@MahnoKropotkinvich did you explicitly enable cgroups? That's not really right for a NetBSD build since NetBSD doesn't support cgroups (at least I don't think it does!). If you didn't explicitly enable it and it get auto-enabled then looks like maybe we have a bug in the configure script. |
Beta Was this translation helpful? Give feedback.
-
I discovered that reboot(8) on NetBSD will send SIGTERM to all processes before triggering system rebooting, but this will cause dinit to try repeatedly recover the service being killed and reboot will keep killing, causing an infinite loop. We should consider build a wrapper for reboot(8) to stop all its services first before initiate system rebooting. |
Beta Was this translation helpful? Give feedback.
-
@iMilnb Hi, I'm doing some deeper research related to dinitctl and shutdown utility. But I failed to find out where is the control socket (should be /run/dinitctl according to the source code). |
Beta Was this translation helpful? Give feedback.
Hi.
Start by reading
README.md
and dinit docs. Also take a look at #434 and https://pkgsrc.se/sysutils/dinit for current status.