Skip to content

Conversation

@schabrolles
Copy link
Contributor

When I boot on rear rescue (tested via grub menu) , I can't use multipath because libaio is missing in the ramdisk.

Here is my proposition for modification:

  • Correct LIB variable name to LIBS
  • Changing ${PROGS[@]} to ${LIBS[@]}
  • Using a local variable to find the directory where libaio is located (can be different depending to the Linux distro and arch; for example /lib/powerpc64le-linux-gnu/libaio.so.1 for ubuntu 16-04 ppc64le).

* Correct LIB variable name to LIBS
* Changing ${PROGS[@]} to ${LIBS[@]}
* Using a local variable to find the directory where libaio is located (can be different depending to the Linux distro and arch; for example /lib/powerpc64le-linux-gnu/libaio.so.1 for ubuntu 16-04 ppc64le).
@gdha gdha added the bug The code does not do what it is meant to do label May 30, 2016
@gdha gdha added this to the Rear v1.19 milestone May 30, 2016
@gdha gdha self-assigned this May 30, 2016
LIB=( "${PROGS[@]}" libaio* )

# depending to the linux distro and arch, libaio can be located in different dir. (ex: /lib/powerpc64le-linux-gnu)
libaio_dir=$(ldconfig -p | awk '/libaio.so/ { print $NF }' | xargs -n1 dirname)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be careful as with F23 I got:

ldconfig -p | awk '/libaio.so/ { print $NF }'| xargs -n1 dirname
/lib64
/lib64

This will ruin your variable libaio_dir

@gdha
Copy link
Member

gdha commented May 30, 2016

@schabrolles See my comment in the pull request. And, thank you for finding this bug

@schabrolles
Copy link
Contributor Author

schabrolles commented May 30, 2016

@gdha, you are right. I proposed the following:

  • Using sort -u to filter duplicate DIR
  • Create a VAR with concatenate DIR/libaio(if several different PATH has to be added)
    for libdir in $(ldconfig -p | awk '/libaio.so/ { print $NF }' | xargs -n1 dirname | sort -u); do
        libaio2add="$libaio2add $libdir/libaio*"
    done
    LIBS=( "${LIBS[@]}" $libaio2add )

Your feedback are welcome.

* Using sort -u to filter duplicate DIR
* Create a libaio2add with concatenate DIR/libaio (if several different PATH has to be added)
@gdha gdha merged commit 5a20ac1 into rear:master Jun 1, 2016
schabrolles added a commit to schabrolles/rear that referenced this pull request Apr 24, 2017
 - same issue than rear#852. multipath need libaio.
schabrolles added a commit to schabrolles/rear that referenced this pull request Apr 24, 2017
 - same issue than rear#852. multipath need libaio.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug The code does not do what it is meant to do

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants