It's pretty pointless to copy data from /run/log/journal to
/var/log/journal, since both of those are in-memory filesystems.
This should somewhat reduce RAM use during installation.
Anaconda runtime is already in memory, no need to use tmpfs here. In
fact use of tmpfs here will overwrite any updates content that was put
in place by dracut.
The 'systemctl' command can be used to enable, disable, or mask systemd
units inside the runtime being modified. Modify runtime-postinstall.tmpl
to use the 'systemctl' command.
We also no longer remove quota*.service or kexec*.service, since
these aren't enabled by default. And systemd-remount-api-vfs.service
should work correctly now, so we can leave it alone as well.
A lot of the systemd unit files got moved around due to UsrMove, so
these lines weren't removing the services as expected.
Fix the paths and they all work. This eliminates the "FAILED"
message from systemd-remount-api-vfs.service and plymouth-start.service.
Oh - and the ConsoleKit removal got dropped 'cuz ConsoleKit isn't in the
installer images anymore.
We use this to set various sysctl settings, like setting kernel.printk=1
so we don't get the screen all crudded up with kernel messages during
text-mode installs.
Since noloader mounts stuff under /run/install, but anaconda (and
people's scripts etc.) look under /mnt/install, make a symlink so
everything works as expected.
We were appending to /etc/shadow when previous versions of lorax
overwrote it, so we ended up with two conflicting entries for "root".
Instead:
- keep existing /etc/shadow and /etc/passwd contents
- add new entries for "install" user
- remove password from existing "root" entry in /etc/shadow
Also, we don't need to create the 'sshd' user, because the
openssh-server %post script does that for us.
Makefile-style "-cmd" syntax lets us run a command and ignore any
resulting errors. This is a more general version of what copyif/moveif
were trying to accomplish, so we can drop those commands.
symlinking /modules to '/lib/modules' inside the runtime image is fine,
but since we're operating outside the runtime image, the absolute
symlink will point to the host's /lib/modules, which can cause us to
delete kernel modules. Yikes.
Instead:
1) use /lib/modules rather than the symlink, and
2) use a relative symlink, just to be safe.
move arch-specific stuff to arch-specific subdirs and move all the
common stuff to a subdir named 'common'. Also, rename '.profile' and
'.bash_history' so you actually see them when you 'ls' the 'common' dir.
also added some helpful(?) comments to the templates.
also make sure we clean a bunch more unneeded services, but don't bother
deleting target files that would just be ignored anyway.
also also, delete everything in /etc/systemd/system/default.target.wants
so that we don't get readahead stuff in anaconda.
If it's a symlink, we'll copy the file into the symlink, and then we'll
likely remove the target of the symlink (../bin/systemd) in cleanup, and
then we have no init. Boo.