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.
To build F15 images we need to remove systemd and set up loader as init
(see runtime-cleanup and runtime-postinstall).
We also need to add a hack to dracut so loader won't freak out when it
gets started by anaconda - see the file we're adding to the initramfs in
treebuilder.py.
(There's also an extra bonus hack for working around a bug in dracut if
/proc/cmdline is empty - SEE IF YOU CAN SPOT IT!!!)