Skip to content

Commit

Permalink
del installZfsLib
Browse files Browse the repository at this point in the history
  • Loading branch information
szorfein committed Oct 5, 2017
1 parent 8d34d36 commit 96449b4
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions mkinitramfs-ll.sh
Original file line number Diff line number Diff line change
Expand Up @@ -356,20 +356,10 @@ for bin in dmraid mdadm zfs; do
done
module_group="${module_group/mdadm/raid}"

installZfsLib() {
local _lib="libgcc_s.so.1"
local _cmd="$(find /usr/lib64 -type f | grep $_lib | sort -r | head -n 1)"
local _dest="usr/lib${LONG_BIT}"

[ ! -f "$_dest/$_lib"&& cp -a "$_cmd" "$_dest/"
}

# Set up (requested) hook
for hook in ${hooks}; do
for file in "${usrdir}"/../hooks/*${hook}*; do
cp -a "${file}" lib/${package}/

[ $hook = "zfs" ] && installZfsLib
done
if [ ${?} != 0 ]; then
warn "No $hook hook/script does not exist"
Expand All @@ -379,6 +369,17 @@ for hook in ${hooks}; do
module_group="${module_group} ${hook}"
done

# Install libgcc_s.so.1 if zfs hook is select.
for hook in ${hooks}; do
if [ $hook = "zfs" ] && [ ! -f "$_dest/$_lib" ] ; then
_lib="libgcc_s.so.1"
_cmd="$(find /usr/lib64 -type f | grep $_lib | sort -r | head -n 1)"
_dest="usr/lib${LONG_BIT}"
cp -a "$_cmd" "$_dest/"
unset _lib _cmd _dest
fi
done

[ -f /etc/issue.logo ] && cp /etc/issue.logo etc/

# Handle & copy BusyBox binary
Expand Down

0 comments on commit 96449b4

Please sign in to comment.