diff --git a/xbps-src/shutils/chroot.sh.in b/xbps-src/shutils/chroot.sh.in index e7649e5fd5c..bee53926368 100644 --- a/xbps-src/shutils/chroot.sh.in +++ b/xbps-src/shutils/chroot.sh.in @@ -181,7 +181,6 @@ prepare_binpkg_repos() create_busybox_links() { - local busyboxdir=$XBPS_MASTERDIR/usr/lib/busybox-initramfs local lbindir=$XBPS_MASTERDIR/usr/local/bin [ -f $XBPS_MASTERDIR/.busybox_done ] && return 0 @@ -189,10 +188,11 @@ create_busybox_links() [ ! -d ${lbindir} ] && mkdir -p ${lbindir} # Create other symlinks in /usr/local/bin - for f in $(find ${busyboxdir} -type l); do - cd ${lbindir} || return 1 - [ "$(basename $f)" = "sh" ] && continue - ln -s ../../lib/busybox-initramfs/bin/busybox $(basename $f) + cd ${lbindir} || return 1 + + for f in $(${XBPS_MASTERDIR}/bin/busybox --list); do + [ "$f" = "sh" ] && continue + ln -s ../../../bin/busybox $f done touch -f $XBPS_MASTERDIR/.busybox_done