in ,

KillingSpark / rustysd, Hacker News

KillingSpark / rustysd, Hacker News


                    

        

A minimal drop-in for (a subset of) the systemd init system in rust. For now that is just out of interest how far I could come with this and what would be needed to get a somewhat working system. It is very much a proof of concept. For the love of god do not use this in anything that is important.

It does look somewhat promising, the really ugly parts are “working”. There is a lot of cleanup to be done. There is a whole lot of unwrap () calling where error handling should be done properly.

What works

This section should be somewhat up to date with what parts are (partly?) Implemented

      Parsing of service files (a subset of the settings are recognized)

    1. Parsing of socket files (a subset of the settings are recognized)
      1. Ordering of services according to the before / after relations

          Killing services that require services that have died

            Matching services and sockets either by name or dynamically by parsing the appropiate settings in the .service / .socket filesPassing filedescriptors to the daemons as systemd clients expect them (names and all that good stuff)

          1. Pretty much all parts of the sd_notify API
          2. Waiting for the READY=1 notification for services of type notify

            1. Waiting for services of type dbus
                1. ********************

                  Running

                  What does not work

                  Just some stuff I know does not work but would be cool to have

                      Dependency management is currently lacking. Simple 1: 1 dependencies work but stuff like waiting on more than one service does notSocket activation. Right now services with a socket will be started right away in parallel with all others. They could just not be spawned and waited on with a select until they are ready. This will be needed anyways for inetd style socket activationSocket options like MaxConnections=/ KeepAlive=

                        Killing services properly. SigTerm / Kill / Hup / executing the stop commands …..

                            The whole dbus shenanigans

                            1. More socket types
                                Netlink is missing for example
                                1. The rest of the sd_notify API (with storing filedescriptors and such)

                                  1. A systemctl equivalent to control / query rustysd (some querying has been implemented using serde-json but its just a concept right now)
                                    1. ********************   

      **************Brave BrowserRead More************

      What do you think?

      Leave a Reply

      Your email address will not be published. Required fields are marked *

      GIPHY App Key not set. Please check settings

      Congratulations to Joe Burrow on Winning a Really Big Paper Weight, Crypto Coins News

      Congratulations to Joe Burrow on Winning a Really Big Paper Weight, Crypto Coins News

      ggerganov / imtui, Hacker News

      ggerganov / imtui, Hacker News