summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2020-12-10 07:02:59 (EST)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2020-12-10 07:05:58 (EST)
commitaf48b191af437de6708f112951ebd24bba87859f (patch)
tree1989998607aa616daccd7a2a4cab921e65b3d177
parent315f395aaa844d4a257fb0c9c90a4dd4a19d106c (diff)
/etc/rc.common: Don't rely on utility links
-rw-r--r--changelog3
-rw-r--r--src.etc/rc.common7
2 files changed, 8 insertions, 2 deletions
diff --git a/changelog b/changelog
index 70fdbc3..c0c8e35 100644
--- a/changelog
+++ b/changelog
@@ -5,6 +5,9 @@ busybox (1.32.0-2) trunk
after upstream split the ifup/ifdown configuration option into two.
* Utility links managed with update-alternatives now point directly to
</bin/busybox>, and <*.busybox> links have been removed.
+ * </etc/rc.common> no longer relies on utility links. This allows
+ prokit's foreign installation service initialization script to run
+ before utility links are created.
-- Patrick McDermott <patrick.mcdermott@libiquity.com> Thu, 10 Dec 2020 06:23:11 -0500
diff --git a/src.etc/rc.common b/src.etc/rc.common
index 9db482b..c262f6b 100644
--- a/src.etc/rc.common
+++ b/src.etc/rc.common
@@ -10,6 +10,8 @@
set -u
+BB='/bin/busybox'
+
SCRIPT=''
ALL_CMDS=''
LOG_MSG=''
@@ -42,7 +44,7 @@ tty_printf()
{
local tty=
- tty="$(tty)" && printf "${@}" >"${tty}"
+ tty="$("${BB}" tty)" && printf "${@}" >"${tty}"
}
usage() {
@@ -105,7 +107,8 @@ main()
if [ "x${ALL_CMDS#* ${action} }" != "x${ALL_CMDS}" ]; then
[ "x${action%able}" = "x${action}" ] && \
[ -f /etc/rc.policy ] && \
- [ "x$(cat /etc/rc.policy)" = 'xdisabled' ] && return 0
+ [ "x$("${BB}" cat /etc/rc.policy)" = 'xdisabled' ] && \
+ return 0
${action}
es=${?}
log_end ${es}