summaryrefslogtreecommitdiffstats
path: root/busybox.pkg/postinst
diff options
context:
space:
mode:
Diffstat (limited to 'busybox.pkg/postinst')
-rwxr-xr-xbusybox.pkg/postinst23
1 files changed, 13 insertions, 10 deletions
diff --git a/busybox.pkg/postinst b/busybox.pkg/postinst
index 29c3d31..2120eeb 100755
--- a/busybox.pkg/postinst
+++ b/busybox.pkg/postinst
@@ -1,14 +1,17 @@
#!/bin/sh
if [ "x${1}" = 'xconfigure' ]; then
- update-alternatives --install /usr/bin/awk awk /usr/bin/awk.busybox 10
- update-alternatives --install /usr/bin/ar ar /usr/bin/ar.busybox 10
- update-alternatives --install /usr/bin/strings strings \
- /usr/bin/strings.busybox 10
- update-alternatives --install /usr/bin/clear clear \
- /usr/bin/clear.busybox 10
- update-alternatives --install /usr/bin/reset reset \
- /usr/bin/reset.busybox 10
- update-alternatives --install /usr/bin/mkpasswd mkpasswd \
- /usr/bin/mkpasswd.busybox 10
+ while read link name prio; do
+ if [ -e "${link}.busybox" ]; then
+ update-alternatives --install "${link}" "${name}" \
+ "${link}.busybox" "${prio}"
+ fi
+ done <<-EOF
+ /usr/bin/awk awk 10
+ /usr/bin/ar ar 10
+ /usr/bin/strings strings 10
+ /usr/bin/clear clear 10
+ /usr/bin/reset reset 10
+ /usr/bin/mkpasswd mkpasswd 10
+ EOF
fi