summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xbuild11
-rwxr-xr-xbusybox.pkg/postinst6
-rwxr-xr-xbusybox.pkg/prerm4
3 files changed, 10 insertions, 11 deletions
diff --git a/build b/build
index c50860e..99a9d90 100755
--- a/build
+++ b/build
@@ -31,13 +31,16 @@ install:
oh-fixperms
oh-strip
chmod u+s dest/bin/busybox
- set -e; while read link name prio; do \
+ mkdir -p dest/usr/share/busybox
+ set -e; exec 3>dest/usr/share/busybox/alternatives; \
+ while read link name prio; do \
if [ -e "dest/$${link}" ]; then \
mv "dest/$${link}" "dest/$${link}.busybox"; \
+ printf '%s %s %s\n' "$${link}" "$${name}" "$${prio}" \
+ >&3; \
fi; \
- done <../alternatives
- mkdir -p dest/usr/share/busybox
- cp ../alternatives dest/usr/share/busybox
+ done <../alternatives; \
+ exec 3>&-
set -e; $(config_enabled); $(install_init_script); \
if config_enabled INIT; then \
install -d -m 0755 dest/etc; \
diff --git a/busybox.pkg/postinst b/busybox.pkg/postinst
index a9922b6..d0a2cc3 100755
--- a/busybox.pkg/postinst
+++ b/busybox.pkg/postinst
@@ -2,9 +2,7 @@
if [ "x${1}" = 'xconfigure' ]; then
while read link name prio; do
- if [ -e "${link}.busybox" ]; then
- update-alternatives --install "${link}" "${name}" \
- "${link}.busybox" "${prio}"
- fi
+ update-alternatives --install "${link}" "${name}" \
+ "${link}.busybox" "${prio}"
done </usr/share/busybox/alternatives
fi
diff --git a/busybox.pkg/prerm b/busybox.pkg/prerm
index 9565cab..c27fe7e 100755
--- a/busybox.pkg/prerm
+++ b/busybox.pkg/prerm
@@ -2,8 +2,6 @@
if [ "${1}" = remove ]; then
while read link name prio; do
- if [ -e "${link}.busybox" ]; then
- update-alternatives --remove "${name}" "${link}.busybox"
- fi
+ update-alternatives --remove "${name}" "${link}.busybox"
done </usr/share/busybox/alternatives
fi