Our init.c can be broken down roughly into the following set of tasks:
- Mounting filesystems. The initscipts already know how to do this, given that we write out an /etc/fstab.
- Reboot/halt/shutdown handling. How much does anaconda really need to do here?
- Starting services (syslog, udev, dbus, etc.). This can all be handled by init scripts.
- Segv handling. Most of this appears to already be in loader, in which case it can just die.
- Terminal setup. A lot of this is i/p/zSeries stuff. How much is still valid? Some might be handled by systemd. What's not but we still need
can go into loader.
I hate the answer being "we should just start from scratch", but we should just start from scratch. Modify scripts/ to include systemd and not include our init, see what the system looks like, and take it from there. Write a service file for loader. Then start moving things that make sense from init.c to loader.c.
The trick here is going to be testing on s390 and on serial console installs.
-- Chris