When multiple units are passed to systemctl and one fails it doesn't
finish the others. Change the template command to call systemctl for
each unit individually.
This also removes the lvm2-activation-generator in runtime-cleanup.tmpl
Resolves: rhbz#1478247
There's something racy here; in my Atomic Workstation CI/CD I'm seeing:
```
01:12:43 symlink /lib/systemd/system/rngd.service etc/systemd/system/basic.target.wants/rngd.service
01:12:43 FileNotFoundError: [Errno 2] No such file or directory: '/lib/systemd/system/rngd.service' -> '/var/tmp/lorax.7cgdtz1_/installtree/etc/systemd/system/basic.target.wants/rngd.service'
```
Rather than debug this right now, let's just make sure it exists,
like we do right above for `tmp.mount`.
(cherry picked from commit 4f1f118cee)
Signed-off-by: Brian C. Lane <bcl@redhat.com>
Resolves: rhbz#1377430
In order for selinux to properly label the system it needs to see that
the config file exists.
Also remove the old code trying to copy in a selinux config file, it
never worked -- the removepkg would remove it.
(cherry picked from commit d6584e1d77)
Resolves: rhbz#1332147
This will help improve the entropy situation with non-x86 hardware. rngd
will add entropy from hardware rng sources.
Resolves: rhbz#1258516
(cherry picked from commit 690feba381)
The system-wide spice guest agent, spice-vdagentd, normally uses
systemd-logind to determine which of the per-session spice-vdagent
instances it should be communicating with. On the non-live media, the X
session isn't registered with systemd-logind, so instead start
spice-vdagentd with -X to disable the systemd-logind integration and
serve instead to a single spice-vdagent.
(cherry picked from commit 96ecdd4e6e)
Related: rhbz#1169991
This replaces the Adwaita metacity-theme-2.xml file with a version that
sets has_title=False and removes the title borders for maximized
windows. This allows anaconda to run as a maximized window instead of a
fullscreen window while still running without a titlebar.
Related: rhbz#1231856
So we can activate master connection instead of searching for and activating
slave connections.
Makes turning bond/team device on in network spoke work.
Resolves: rhbz#1172751
It also causes a device configured in dracut to be properly reactivated as a slave
if it is configured so by kickstart.
Resolves: rhbz#1134090
We started including it as an unintended side-effect of commit 9ca487f8.
lvm doesn't like it when there are multiple 'global' sections in lvm.conf,
and we add one right at the end of that block. We expect ours to be the
file's only content.
(cherry picked from commit 4a7552d4be)
Related: rhbz#1149992
Right now, logind reserves tty6 for a login shell, which is not what we
want - normally anaconda puts Xorg there, and there's no need for a
login prompt anyway.
This configures logind to activate "anaconda-shell@.service" when a user
switches to an unused tty, and reserves tty2 for that purpose (which is
where users expect a shell anyway).
This will avoid us having login prompts that users don't know what to do
with. It also probably saves us a little bit of RAM.
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.