Has anyone tried "Fake Systemd"?

Issues and / or general discussion relating to Puppy

Moderator: Forum moderators

Post Reply
s243a
Posts: 501
Joined: Mon Dec 09, 2019 7:29 pm
Has thanked: 90 times
Been thanked: 37 times

Has anyone tried "Fake Systemd"?

Post by s243a »

I was looking for a way to start a systemd service without systemd. I found the following project.

I haven't tried it yet.

Fake Systemd

Simple bash script using start-stop-daemon, instead of using original systemctl + dbus + priviliges + seccomp + x packages + conjunction of mercury and venus.
Status

This project is effectively unmaintained. I will do my best to shepherd pull requests, but cannot guarantee a prompt response and do not have bandwidth to address issues or add new features. Please let me know via an issue if you'd be interested in taking ownership of fake-systemd.

https://github.com/kvaps/fake-systemd

As a side note I was trying to figure out how to use snap on puppy (see thread) to try an android mirroring application called guiscrcpy (see thread)

I'll give it a try and let people know if it works for me.

s243a
Posts: 501
Joined: Mon Dec 09, 2019 7:29 pm
Has thanked: 90 times
Been thanked: 37 times

Re: Has anyone tried "Fake Systemd"

Post by s243a »

So this is just basicly a bash script replacement for systemctl:
fake-systemd/systemctl

If you look at the dockerfile exasmple:
fake-systemd/Dockerfile

You'll see that this script starts daemons using the debain command start-stop-daemon. The dockor file actually suggests a replacement for this binary that is supposedly faster

but one can use the debain version if they prefer. Or alternative try to rewrite the systemctl script to use a puppy style daemonization.

Anyway, after copying this script (i.e. systemctl) into my system (dpup buster0 and running it I had to make the following symlinks.

/usr/lib/systemd/system -> /lib/systemd/systerm
/usr/bin/start-stop-daemon -> /start-stop-daemon

after making these changes I think that the script probably works but it isn't enough to get snap working because it doesn't create the socket /run/snapd.socket

In a previous post I tried to create this socket using ncat and socat (see post) but I don't really understand what I'm dong by using ncat and socat.

viewtopic.php?p=9359#p9359

As a side note the socket is defined in:

/lib/systemd/systerm/snapd.socket

Code: Select all

[Unit]
Description=Socket activation for snappy daemon

[Socket]
ListenStream=/run/snapd.socket
ListenStream=/run/snapd-snap.socket
SocketMode=0666
# these are the defaults, but can't hurt to specify them anyway:
SocketUser=root
SocketGroup=root

[Install]
WantedBy=sockets.target

which is referenced in snapd.service as follows:

Code: Select all

Requires=snapd.socket

I would think that in a systemd system that the socket would automatically be created when you start snapd.service. However, the installation instructions for arch gave the following command:

Code: Select all

systemctl enable --now snapd.socket

https://snapcraft.io/docs/installing-snap-on-arch-linux

Post Reply

Return to “Users”