containers / initoverlayfs

GNU General Public License v2.0
40 stars 8 forks source link

initoverlayfs-install: make sure mkfs.erofs is optional #12

Closed dougsland closed 1 year ago

dougsland commented 1 year ago

If there is no mkfs.erofs today the script will fail (as showed below) but as noticed in the spec file it's not required it's recommend (https://github.com/containers/initoverlayfs/blob/main/initoverlayfs.spec#L11):

Here if there is no mkfs.erofs it will fail:

if command -v mkfs.erofs; then
    fstype="erofs"
    cd "$DIR_TO_DUMP_INITRAMFS"
    /usr/lib/dracut/skipcpio /boot/initramfs-$kver.img | $decompressor | cpio -ivd
    cd -
    rm -f /boot/initoverlayfs-$kver.img
    mkfs.erofs /boot/initoverlayfs-$kver.img "$DIR_TO_DUMP_INITRAMFS"
  else
    echo "Please install mkfs.erofs"
    exit 0

However, the initoverlayfs is a multi filesystem tool and out of the box there is ext4 code in the install script.