Welcome to Centmin Mod Community
Become a Member

Beta Branch fix cmsec dmotd progress line suppressed by tee pipe in 140.00beta01

Discussion in 'Centmin Mod Github Commits' started by eva2000, May 9, 2026.

  1. eva2000

    eva2000 Administrator Staff Member

    58,893
    12,490
    113
    May 24, 2014
    Brisbane, Australia
    Ratings:
    +19,122
    Local Time:
    11:32 AM
    Nginx 1.31.x
    MariaDB 10.x/11.4+/12.3+
    fix cmsec dmotd progress line suppressed by tee pipe in 140.00beta01

    The previous progress line in cmsec.sh do_run() DMOTD_MODE branch was
    gated on `[ -t 1 ]` — but config/motd/dmotd.sh:669 wraps the entire
    SSH-login banner in `} 2>&1 | tee "${CENTMINLOGDIR}/cmm-login-git-checks_
    ${DT}.log"`, so cmsec.sh's stdout is the pipe to tee, NOT the user's tty.
    The tty test was always false at SSH login, suppressing the progress
    line in exactly the case it was supposed to fix.

    Drop the `[ -t 1 ]` gate from the DMOTD_MODE branch. The line now always
    prints when --dmotd is passed. Color codes remain empty under the pipe
    (color setup at cmsec.sh:41 still gates on tty), so the line emits as
    plain text — same handling as the verdict lines below.

    Cron consumers (tools/check-for-updates.sh:513 also invokes --dmotd)
    get one harmless extra log line.

    The interactive `do_one_check_full()` progress line keeps its `[ -t 1 ]`
    gate — that path is invoked directly by the user, so the tty test is
    correct.


    Branch parity with 141.00beta01 (commit 1d14657a) and 132.00stable;
    tools/cmm-security/ remains byte-identical across all three branches.

    Continue reading...

    140.00beta01 branch