When building squash image, squash module forgot to install the new
shutdown.sh, and the shutdown hooks are always skipped on ordinary
shutdown if squash module is enabled.
The new shutdown.sh will remount the squash image and then everything
will just work, but currently re-mounting the squash image on shutdown
may have selinux problem and make the system hang, and there is no
easy way to fix it.
So skip fixing the shutdown.sh not being install problem, instead
just drop the new shutdown.sh, and unsquash the image on ordinary
shutdown, which is safer and should always work.
Signed-off-by: Kairui Song <kasong@redhat.com>
Script enables errexit option (set -e). So if /boot is not a mount point
or is already mounted, then script dies after unsuccessful mount
command. Fix this by always returning successful result.
Dracut claims to have LZ4 support, but trying to use it will result in an xzcat failure at the end due to missing CAT support.
The lz4 command chokes on '--', so abstract that out into the CAT select.
Something similar will need to be done for LZO.
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net>