]> granicus.if.org Git - zfs/commitdiff
Fix initramfs hook for merged /usr/lib and /lib
authorMatt Kemp <matt@mattikus.com>
Mon, 27 Feb 2017 20:03:23 +0000 (14:03 -0600)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 27 Feb 2017 20:03:23 +0000 (12:03 -0800)
Under a merged `/lib` -> `/usr/lib` which renders `/lib` as a symlink,
`find /lib -type f -name libgcc_s.so.1` will not return a result as
`find` will not traverse the symlink. Modifying it to `find /lib/ -type
f -name libgcc_s.so.1` should work for both symlinked and non-symlinked
`/lib` directories.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matt Kemp <matt@mattikus.com>
Closes #5834

contrib/initramfs/hooks/zfs

index 53e876d33ab9b2fd921085b57924de117f930b88..dd796b6ff3a7ba860e51b733c280bf033c3e8294 100755 (executable)
@@ -55,7 +55,7 @@ mkdir -p "$DESTDIR/etc/"
 # automatically detected. The `find` utility and extended `cp` options are
 # used here because libgcc_s.so could be in a subdirectory of /lib for
 # multi-arch installations.
-cp --target-directory="$DESTDIR" --parents $(find /lib -type f -name libgcc_s.so.1)
+cp --target-directory="$DESTDIR" --parents $(find /lib/ -type f -name libgcc_s.so.1)
 
 for ii in $COPY_EXEC_LIST
 do