Eliminate warnings about missing ZFS files

zpool.cache and zdev.conf are optional files, so instead of warning when
they are missing, we print a message when they are copied.

Signed-off-by: Richard Yao <ryao@gentoo.org>
master
Richard Yao 12 years ago committed by Fabio Erculiani
parent 80c1c1669a
commit 2741bae03a

@ -336,13 +336,17 @@ append_zfs(){
rm -r "${TEMP}/initramfs-zfs-temp" rm -r "${TEMP}/initramfs-zfs-temp"
fi fi
mkdir -p "${TEMP}/initramfs-zfs-temp/etc/zfs/" mkdir -p "${TEMP}/initramfs-zfs-temp/etc/zfs"
# Copy files to /etc/zfs # Copy files to /etc/zfs
for i in /etc/zfs/{zdev.conf,zpool.cache} for i in zdev.conf zpool.cache
do do
cp -a "${i}" "${TEMP}/initramfs-zfs-temp/etc/zfs" 2> /dev/null \ if [ -f /etc/zfs/${i} ]
|| print_warning 1 "Could not copy file ${i} for ZFS" then
print_info 1 " >> Including ${i}"
cp -a "/etc/zfs/${i}" "${TEMP}/initramfs-zfs-temp/etc/zfs" 2> /dev/null \
|| gen_die "Could not copy file ${i} for ZFS"
fi
done done
# Copy binaries # Copy binaries

Loading…
Cancel
Save