Ignore cpio errors because LXC hosts produce warnings

eg. cpio: dev/console: Cannot mknod: Operation not permitted
Warning because the initrd.gz content is extracted but provide an exit
code different from 0…
This commit is contained in:
Jeremy Gardais 2022-02-01 13:31:17 +01:00
parent a86359dc4e
commit bcd40f477f
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 1 additions and 2 deletions

View File

@ -194,8 +194,7 @@ Manage initrd and firmwares for ${RED}${DISTRO}${COLOR_DEBUG} release."
mkdir -- "${TEMP_DIR}"/mkinitrd
pushd "${TEMP_DIR}"/mkinitrd/ > /dev/null \
|| error_message "Can't move to ${TEMP_DIR}/mkinitrd/ directory." 2
zcat "${initrd_file}" | cpio --extract --quiet --preserve-modification-time 1>/dev/null \
|| error_message "Can't extract ${initrd_file} file for ${DISTRO}." 4
zcat "${initrd_file}" | cpio --extract --quiet --preserve-modification-time 1>/dev/null 2>&1
popd > /dev/null \
|| error_message "Can't move back from ${TEMP_DIR}/mkinitrd/ directory." 2
## }}}