fix issues

This commit is contained in:
illiliti 2020-04-18 11:21:28 +03:00
parent 9f9ed09508
commit f8307b8897
2 changed files with 7 additions and 5 deletions

View File

@ -110,7 +110,7 @@ install_requirements()
info "installing requirements" info "installing requirements"
# install user specified and required binaries # install user specified and required binaries
for _binary in $binaries \[ sh sleep mount printf setsid switch_root; do for _binary in $binaries \[ sh ln sleep mount printf setsid switch_root; do
install_binary "$_binary" install_binary "$_binary"
done done
@ -161,7 +161,7 @@ install_devmgr()
install_devmgr_helper() install_devmgr_helper()
{ {
for _binary in ln kill mkdir blkid "${filesdir}/device-helper"; do for _binary in kill mkdir blkid "${filesdir}/device-helper"; do
install_binary "$_binary" install_binary "$_binary"
done done
@ -404,7 +404,8 @@ install_binary()
# iterate throught symlinks and copy them # iterate throught symlinks and copy them
while [ -h "$binary" ]; do while [ -h "$binary" ]; do
cp -P "$binary" "$workdirbin" cp -P "$binary" "$workdirbin"
binary="${binary%/*}/$(readlink "$binary")" readlink_binary=$(readlink "$binary")
binary="${binary%/*}/${readlink_binary##*/}"
done done
install -m755 "$binary" "${workdirbin}${binary##*/}" install -m755 "$binary" "${workdirbin}${binary##*/}"
@ -437,7 +438,8 @@ install_library()
# iterate throught symlinks and copy them # iterate throught symlinks and copy them
while [ -h "$library" ]; do while [ -h "$library" ]; do
cp -P "$library" "$workdirlib" cp -P "$library" "$workdirlib"
library="${library%/*}/$(readlink "$library")" readlink_library=$(readlink "$library")
library="${library%/*}/${readlink_library##*/}"
done done
install -m755 "$library" "${workdirlib}${library##*/}" install -m755 "$library" "${workdirlib}${library##*/}"

View File

@ -71,7 +71,7 @@ prepare_environment()
trap 'panic "something went wrong"' EXIT trap 'panic "something went wrong"' EXIT
[ "$modules" ] && modprobe -a "$modules" [ "$modules" ] && modprobe -a "$modules" ||:
} }
parse_cmdline() parse_cmdline()