From af48b191af437de6708f112951ebd24bba87859f Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Thu, 10 Dec 2020 07:02:59 -0500 Subject: /etc/rc.common: Don't rely on utility links --- (limited to 'src.etc') 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} -- cgit v0.9.1