[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [PATCH] move from our own init to systemd

Chris Lumens <clumens redhat com> wrote:

> > I do not think we should hold up this patch set for s390 changes, but
> > there will be a fair amount of work to hack up and dismantle linuxrc.s390.
> > I would like systemd to start up as init on s390 just like it does on the
> > non-s390 platforms, and then use the unit file dependency capability to
> > have it run either one or multiple interactive device configuration
> > programs.  The whole point of linuxrc.s390 is to bring up system devices
> > and set up networking so we can lauch loader when the user logs in via
> > ssh.  Because that needs to happen before loader runs and we have
> > historically had our init.c launch loader, linuxrc.s390 became init on
> > that platform.
> Yeah, so the first step is to take everything we require from
> linuxrc.s390 and rewrite in Python (hooray!).  Perhaps we can even get
> some code reuse from pyanaconda that way.  Then, add some
> anaconda-s390.service file that only gets installed on s390.  That'll
> start up the Python program to interrogate for device config.  In lorax,
> we conditionally add that file to
> /lib/systemd/system/loader.service.wants and make sure we set the
> Before= appropriately too.
> Bam, working in systemd just fine.  For me, the greatest advantage to
> this approach is that s390 acts just like every other platform except we
> run one extra program.  That's much different from now where we take an
> entirely different path to loader.  One significant advantage to s390
> with this is that fewer differences means fewer places we will
> accidentally break it when making changes.

Yeah, this is exactly along the lines I was thinking.

> > The parts of linuxrc.s390 we'll need to salvage are the prompts and
> > validation code for different device types.  The parts that make the
> > script work enough like init so it can be init can be trashed.  I would
> > very much like to have these parts rewritten in Python since we have that
> > now in initrd.img, or at the very least multiple smaller shell scripts
> > divided in to logical tasks.
> My preferred approach would be one Python program with all the various
> prompts and validation code as modules.  Like I said earlier, it'd be
> nice to share with pyanaconda where appropriate.
> Multiple programs could be done, but with more .service file copying and
> linking.  It seems a little unnecessarily messy.

A single Python program is fine with most of the code in pyanaconda.  I
was thinking multiple programs if it were staying in shell and the fact
that I just wanted to break up the 3000+ line shell script.  But that'll
go, so whatever.

> > At any rate, we can keep linuxrc.s390 around for now.
> It's still being kept around, but keep in mind anaconda will call
> systemctl to do the reboot/shutdown/etc. and I don't think that'll work
> if systemd's not running.

It's rawhide.  Patches welcome and all until we get around to it.

David Cantrell <dcantrell redhat com>
Supervisor, Installer Engineering Team
Red Hat, Inc. | Honolulu, HI | UTC-10

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]