diff options
author | Jonathan Bauer | 2019-08-27 12:35:42 +0200 |
---|---|---|
committer | Jonathan Bauer | 2019-08-27 12:35:42 +0200 |
commit | fff2690d71cf705980ee597ae9911ad5a2a64e50 (patch) | |
tree | 7e4aa7bb7abea799358e035be49b981ffe3e2768 | |
parent | [slx-network] separate logfiles (diff) | |
download | systemd-init-fff2690d71cf705980ee597ae9911ad5a2a64e50.tar.gz systemd-init-fff2690d71cf705980ee597ae9911ad5a2a64e50.tar.xz systemd-init-fff2690d71cf705980ee597ae9911ad5a2a64e50.zip |
[busybox] fix installation path in stage4
-rw-r--r-- | builder/modules.d/busybox/install-busybox-stage4.sh | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/builder/modules.d/busybox/install-busybox-stage4.sh b/builder/modules.d/busybox/install-busybox-stage4.sh index f0e25945..ad34b75c 100644 --- a/builder/modules.d/busybox/install-busybox-stage4.sh +++ b/builder/modules.d/busybox/install-busybox-stage4.sh @@ -1,8 +1,16 @@ #!/bin/bash if hash busybox; then - mkdir -p "$NEWROOT/opt/openslx/bin" - busybox --install -s "$NEWROOT/opt/openslx/bin" - cp "$(type -p busybox)" "$NEWROOT/opt/openslx/bin" + # check if the stage4 has a busybox in the same location + # as within the initramfs. If so, we keep it and just hope + # that everything works out. If there is none, we can copy + # our busybox there safely + bb_path="$(type -p busybox)" + if ! [ -x "${NEWROOT}/${bb_path}" ]; then + cp -f "$bb_path" "${NEWROOT}/${bb_path}" + fi + # finally install the applets under /opt/openslx/bin + mkdir -p "${NEWROOT}/opt/openslx/bin" + busybox --install -s "${NEWROOT}/opt/openslx/bin" fi true |