containers / initoverlayfs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

initoverlayfs-install: make sure mkfs.erofs is optional

dougsland opened this issue · comments

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.