diff options
author | Richard Yao <ryao@gentoo.org> | 2013-06-09 03:56:57 -0400 |
---|---|---|
committer | Richard Yao <ryao@cs.stonybrook.edu> | 2013-06-09 09:47:39 -0400 |
commit | 3851e0653f342668e7911d58c0214dcea6d61b3c (patch) | |
tree | 7fb5b12ac8032a963fcce409027e23514b6c1587 | |
parent | Load xhci-plat when available (diff) | |
download | genkernel-3851e0653f342668e7911d58c0214dcea6d61b3c.tar.gz genkernel-3851e0653f342668e7911d58c0214dcea6d61b3c.tar.bz2 genkernel-3851e0653f342668e7911d58c0214dcea6d61b3c.zip |
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>
-rwxr-xr-x | gen_initramfs.sh | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gen_initramfs.sh b/gen_initramfs.sh index 745e15a..9b354a4 100755 --- a/gen_initramfs.sh +++ b/gen_initramfs.sh @@ -424,13 +424,17 @@ append_zfs(){ rm -r "${TEMP}/initramfs-zfs-temp" fi - mkdir -p "${TEMP}/initramfs-zfs-temp/etc/zfs/" + mkdir -p "${TEMP}/initramfs-zfs-temp/etc/zfs" # Copy files to /etc/zfs - for i in /etc/zfs/{zdev.conf,zpool.cache} + for i in zdev.conf zpool.cache do - cp -a "${i}" "${TEMP}/initramfs-zfs-temp/etc/zfs" 2> /dev/null \ - || print_warning 1 "Could not copy file ${i} for ZFS" + if [ -f /etc/zfs/${i} ] + 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 # Copy binaries |