Skip to content

Commit 540ddb2

Browse files
committed
busybox: remove Arch static libcrypt hack
1 parent b31404e commit 540ddb2

1 file changed

Lines changed: 10 additions & 20 deletions

File tree

scripts/build_busybox.sh

Lines changed: 10 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,18 @@ cd "$BUSYBOX_SRC"
1717
cp "$NICE_PRESET_PATH/busybox.config" '.config'
1818
grep -q 'CONFIG_STATIC=y' '.config' || dd "CONFIG_STATIC=y is required for busybox"
1919

20-
if [ -z $ARCH ] && [ -e "/usr/src/niceOS.hash" ] && (! ldconfig -p | grep -E 'libg?crypt\.a') && (file /bin/busybox | grep 'statically linked'); then # arch removes static libcrypt
21-
notify "Using host static busybox"
22-
cp -f /bin/busybox "$BUSYBOX_SRC/busybox"
23-
usedHostBusybox=1
24-
else
25-
make $MAKEFLAGS busybox
26-
fi
20+
make $MAKEFLAGS busybox
21+
make CONFIG_PREFIX="_install" install > /dev/null
2722

2823
mkdir -p "$TARGET/usr/bin"
29-
# Install busybox widgets if no $TARGET 'sh' and no 'core' counterparts is available
30-
if ([ ! -x "$TARGET/bin/sh" ] || [ "busybox" == $(readlink "$TARGET/bin/sh") ]); then
31-
if [ "$usedHostBusybox" == "1" ]; then
32-
widgets=$(./busybox --list)
33-
else
34-
make CONFIG_PREFIX="_install" install &> /dev/null
35-
widgets=$(find ./_install/ -type l -exec basename {} \;)
36-
fi
37-
pushd "$TARGET/usr/bin/"
24+
pushd "$TARGET/usr/bin/"
25+
cp -f "$BUSYBOX_SRC/busybox" "busybox" && chmod o+rx "busybox"
26+
27+
# Install busybox widgets if no $TARGET 'sh' and no 'core' counterparts is available
28+
if ([ ! -x "sh" ] || [ "busybox" == $(readlink "sh") ]); then
29+
widgets=$(find "$BUSYBOX_SRC/_install/" -type l -exec basename {} \;)
3830
for widgetName in $widgets; do
3931
ln -s busybox $widgetName 2> /dev/null || true
4032
done
41-
popd
42-
fi
43-
cp -f "$BUSYBOX_SRC/busybox" "$TARGET/usr/bin/busybox"
44-
chmod o+rx "$TARGET/usr/bin/busybox"
33+
fi
34+
popd

0 commit comments

Comments
 (0)