[systemd-devel] Archlinux patch for services and getty

Tom Gundersen teg at jklm.no
Wed Jun 16 05:19:06 PDT 2010


Lennart, Marius,

I don't know what happened with Marius' patches, so I'm submitting the
patch I need to make my system boot (taking into account the comments
made by Lennart).

On Thu, May 20, 2010 at 6:27 PM, Lennart Poettering
<lennart at poettering.net> wrote:
> On Thu, 20.05.10 15:17, Marius O (marius at habarnam.ro) wrote:
>
>> > Are you sure you have something like rc.local?
>>
>> Yes, Arch has it... but with the mention of having a
>> rc.local.shutdown. Is there a way of defining a dependency between the
>> two (ie, if we start the service responsible for rc.local we should
>> run at shutdown time the rc.local.shutdow) ?
>
> Hmm, this could be something you want to put in the ExecStop line in
> your service file then.

Done.

>> > And are you sure you need
>> > that stupid hack I have in there that establishes two names for rc.local
>> > because our symlink for that is so weird? (i.e. we have a symlink
>> > /etc/rc2.d/S99local → /etc/rc.local instead of /etc/rc2.d/S99rc.local).
>>
>> There's exactly /etc/rc.local, as Arch doesn't have the /etc/rcN.d
>> runlevel folders.
>
> Ah, so you have are not using the classic SysV layout? Are there no
> runlevels currently being used on ArchLinux?

As far as I know the runlevel support on Arch is very minimal (see below).

>> > If you call /sbin/halt and friends directly you should be able to simply
>> > pass -f, and you won't need the RUNLEVEL=6 env hack then. (RUNLEVEL=6 is
>> > needed because sysvinit's halt is just one evil piece of code and our
>> > halt script on Fedora does not pass -f to halt).

Arch (in /etc/rc.shutdown) uses the runlevel to decide if it should
reboot or halt, so this hack is needed (as far as I can tell).

With the attached patch Arch boots, but more work is needed before
systemd can be a dropin replacement for sysvinit on Arch:

1) parse the DAEMONS array from /etc/rc.conf
2) each daemon should be made into a service and be scheduled "After"
the preceding daemon in the array.

Two exceptions:
* if a daemon has an "!" in front of it, it should be ignored
* if a daemon has an "@" in front of it, no later daemon should have
an "After" dependency on it (the service is started in the background)

Would a patch to do this be accepted? I might work on it in a few
weeks time if no one does it before me.

-t
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Make-Arch-boot.patch
Type: text/x-patch
Size: 6463 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20100616/5501de49/attachment.bin>


More information about the systemd-devel mailing list