summaryrefslogtreecommitdiffstats
path: root/builder/modules.d/busybox/install-busybox-stage4.sh
blob: ad34b75c41c342f965b714505f0d56a71ae8c2c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash

if hash busybox; then
	# 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