tSuppress 'chattr' errors occurring non-copy_on_write fs (zlibs/imaging) - libdevuansdk - common library for devuan's simple distro kits HTML git clone https://git.parazyd.org/libdevuansdk DIR Log DIR Files DIR Refs DIR Submodules DIR README DIR LICENSE --- DIR commit 647e0f65c6ff2984c65c25d6ae2a93fc4f33feb6 DIR parent 0804679ca01283c558b8192bd6069c1a5c538374 HTML Author: gryrmln <gryrmln@localhost> Date: Fri, 2 Apr 2021 11:43:42 +0100 Suppress 'chattr' errors occurring non-copy_on_write fs (zlibs/imaging) Signed-off-by: gryrmln <gryrmln@localhost> Diffstat: M zlibs/imaging | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) --- DIR diff --git a/zlibs/imaging b/zlibs/imaging t@@ -48,7 +48,7 @@ image_prepare_raw() notice "Creating raw image of $size MB" touch "$workdir/${image_name}.img" - chattr +C "$workdir/${image_name}.img" + chattr -f +C "$workdir/${image_name}.img" dd if=/dev/zero of="$workdir/${image_name}.img" bs=1M count="$size" || { zerr; return 1; } } t@@ -60,7 +60,7 @@ image_prepare_qcow2() notice "Creating qcow2 image of $size MB" touch "$workdir/${image_name}.qcow2" - chattr +C "$workdir/${image_name}.qcow2" + chattr -f +C "$workdir/${image_name}.qcow2" qemu-img create -f qcow2 "${workdir}/${image_name}.qcow2" "${size}M" || { zerr; return 1; } } t@@ -313,7 +313,7 @@ image_raw_to_qcow2() notice "Converting raw image to qcow2" pushd "$workdir" || { zerr; return 1; } touch "${image_name}.qcow2" - chattr +C "${image_name}.qcow2" + chattr -f +C "${image_name}.qcow2" qemu-img convert -f raw -O qcow2 "${image_name}.img" "${image_name}.qcow2" || { zerr; return 1; } popd } t@@ -327,7 +327,7 @@ image_raw_to_vdi() notice "Converting raw image to vdi" pushd "$workdir" || { zerr; return 1; } touch "${image_name}.vdi" - chattr +C "${image_name}.vdi" + chattr -f +C "${image_name}.vdi" qemu-img convert -f raw -O vdi "${image_name}.img" "${image_name}.vdi" || { zerr; return 1; } #VBoxManage modifyhd "${image_name}.vdi" --type immutable --compact || { zerr; return 1; } popd