# HG changeset patch # User Roy Marples # Date 1590073945 -3600 # Node ID 50eb48a9b47bf6ae335047c4888894d46e050931 # Parent 698ca745f939c7f1be3e0b180aec6ef9458a88c1 dhcpcd: Silence console output entirely with more -q SystemD logs console ouput and syslog to the same place. Pretty daft if you ask me, but heh. -qq disables console output entirely to make SystemD logs easier to read. diff -r 698ca745f939 -r 50eb48a9b47b src/dhcpcd.8.in --- a/src/dhcpcd.8.in Thu May 21 15:35:06 2020 +0100 +++ b/src/dhcpcd.8.in Thu May 21 16:12:25 2020 +0100 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 12, 2020 +.Dd May 21, 2020 .Dt DHCPCD 8 .Os .Sh NAME @@ -669,7 +669,9 @@ Quiet .Nm on the command line, only warnings and errors will be displayed. -The messages are still logged though. +If this option is used another time then all console output is disabled. +These messages are still logged via +.Xr syslog 3 . .It Fl T , Fl Fl test On receipt of DHCP messages just call .Pa @SCRIPT@ diff -r 698ca745f939 -r 50eb48a9b47b src/dhcpcd.c --- a/src/dhcpcd.c Thu May 21 15:35:06 2020 +0100 +++ b/src/dhcpcd.c Thu May 21 16:12:25 2020 +0100 @@ -1900,7 +1900,14 @@ i = 4; break; case 'q': - logopts |= LOGERR_QUIET; + /* -qq disables console output entirely. + * This is important for SystemD because it logs + * both console AND syslog to the same log + * resulting in untold confusion. */ + if (logopts & LOGERR_QUIET) + logopts &= ~LOGERR_ERR; + else + logopts |= LOGERR_QUIET; break; case 'x': sig = SIGTERM;