summaryrefslogtreecommitdiffstats
path: root/busybox.pkg
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2020-11-04 04:00:34 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2020-11-04 04:00:34 (EST)
commit1558d05c62ed90f7d93a14533541c33896b7b733 (patch)
treedb862d6353e7b60208364596434e8900176b4e33 /busybox.pkg
parente37f03311d934a8f33a9ff31db47b18bbf0be555 (diff)
update-alternatives all the things
Diffstat (limited to 'busybox.pkg')
-rwxr-xr-xbusybox.pkg/postinst10
-rwxr-xr-xbusybox.pkg/prerm4
2 files changed, 9 insertions, 5 deletions
diff --git a/busybox.pkg/postinst b/busybox.pkg/postinst
index 9f23a39..ae66306 100755
--- a/busybox.pkg/postinst
+++ b/busybox.pkg/postinst
@@ -1,9 +1,13 @@
#!/bin/sh
if [ "x${1}" = 'xconfigure' ]; then
- while read link name prio; do
- update-alternatives --install "${link}" "${name}" \
- "${link}.busybox" "${prio}"
+ while read link; do
+ # 15 is a (temporary?) middle ground: alternatives that should
+ # override busybox's have priority 20 (which should maybe be
+ # increased to 30), and expect-doc provides a /usr/bin/mkpasswd
+ # alternative with priority 10.
+ update-alternatives --install "${link}" "${link##*/}" \
+ "${link}.busybox" 15
done </usr/share/busybox/alternatives
if ! [ -f /etc/rc.policy ]; then
if [ "x$(cat /etc/proteanos_plat)" = 'xdev' ]; then
diff --git a/busybox.pkg/prerm b/busybox.pkg/prerm
index 30ebdab..39f963d 100755
--- a/busybox.pkg/prerm
+++ b/busybox.pkg/prerm
@@ -6,8 +6,8 @@ if [ "x${1}" = 'xupgrade' ]; then
"/etc/init.d/${script}" stop
done </usr/share/busybox/init-scripts
fi
- while read link name prio; do
- update-alternatives --remove "${name}" "${link}.busybox"
+ while read link; do
+ update-alternatives --remove "${link##*/}" "${link}.busybox"
done </usr/share/busybox/alternatives
if [ -f /usr/share/busybox/www/SHA256SUMS ]; then
if [ -f /var/www/index.html ] && \