There is a bug in the /etc/update-motd.d/50-landscape-sysinfo (Symlink to /usr/share/landscape/landscape-sysinfo.wrapper) script in Ubuntu. The script incorrectly sets the load threshold due to a typo, causing the system information to be disabled unnecessarily when the system load is actually within acceptable limits.
Steps to Reproduce:
1. Open the /etc/update-motd.d/50-landscape-sysinfo script.
2. Notice the line where THRESHOLD is set: THRESHOLD="${cores:-1}.0".
3. The correct variable should be CORES instead of cores.
Expected Behavior:
The threshold should be calculated based on the number of CPU cores, e.g., THRESHOLD="${CORES:-1}.0", and system information should be displayed correctly when the load is below this threshold.
Actual Behavior:
The threshold is incorrectly set to 1.0 due to the typo, causing system information to be disabled unnecessarily.
Original bug report:
===
There is a bug in the /etc/update- motd.d/ 50-landscape- sysinfo (Symlink to /usr/share/ landscape/ landscape- sysinfo. wrapper) script in Ubuntu. The script incorrectly sets the load threshold due to a typo, causing the system information to be disabled unnecessarily when the system load is actually within acceptable limits.
Steps to Reproduce:
1. Open the /etc/update- motd.d/ 50-landscape- sysinfo script. "${cores: -1}.0".
2. Notice the line where THRESHOLD is set: THRESHOLD=
3. The correct variable should be CORES instead of cores.
Expected Behavior: "${CORES: -1}.0", and system information should be displayed correctly when the load is below this threshold.
The threshold should be calculated based on the number of CPU cores, e.g., THRESHOLD=
Actual Behavior:
The threshold is incorrectly set to 1.0 due to the typo, causing system information to be disabled unnecessarily.
Version Information:
Ubuntu 24.04 LTS: landscape-common 24.02-0ubuntu5 22.04.2
Ubuntu 22.04.4 LTS: landscape-common 23.02-0ubuntu1~