From eba2e893c235a83b44e0e23983ca241b8b29bd2d Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 03 Jun 2014 16:25:17 -0400 Subject: /etc/rc.common: Fix tty_printf(). Apparently local always returns a 0 exit status, so tty_printf() would print something (to a file named "not a tty") even if stdin was not a tty. --- diff --git a/src.etc/rc.common b/src.etc/rc.common index 7bf1917..7ddc27e 100644 --- a/src.etc/rc.common +++ b/src.etc/rc.common @@ -52,7 +52,9 @@ main() tty_printf() { - local tty="$(tty)" && printf "${@}" >"${tty}" + local tty= + + tty="$(tty)" && printf "${@}" >"${tty}" } usage() { -- cgit v0.9.1