Public bug reported:

Steps to reproduces:

1. Install dynamic-motd package
2. Run /etc/update-motd.d/20-system-info

Expected results: prints system info.

Actual results: fails with ZeroDivisionError

Note that this bug is only present in package version 0.04-1 with
version 1.2 of the sysinfo.py script and is fixed in the upstream
version (1.3).

https://github.com/ldidry/dynamic-
motd/commit/9adc248da29ea6db2caf5c6130531f5365bbd268

Full output:

/etc/update-motd.d/sysinfo.py:43: SyntaxWarning: "is" with 'int' literal. Did 
you mean "=="?
  if a[0].find('/dev/') is 0:
/etc/update-motd.d/sysinfo.py:54: SyntaxWarning: "is" with 'int' literal. Did 
you mean "=="?
  if a[0].find('/dev/') is 0:
Traceback (most recent call last):
  File "/etc/update-motd.d/sysinfo.py", line 64, in <module>
    iStatfs = inode_proc_mount()
              ^^^^^^^^^^^^^^^^^^
  File "/etc/update-motd.d/sysinfo.py", line 56, in inode_proc_mount
    perc = 100-100.*statfs.f_ffree/statfs.f_files
               ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
ZeroDivisionError: float division by zero

ProblemType: Bug
DistroRelease: Ubuntu 24.04
Package: dynamic-motd 0.04-1
ProcVersionSignature: Ubuntu 6.17.0-19.19~24.04.2-generic 6.17.13
Uname: Linux 6.17.0-19-generic x86_64
ApportVersion: 2.28.1-0ubuntu3.8
Architecture: amd64
CasperMD5CheckResult: pass
CurrentDesktop: ubuntu:GNOME
Date: Fri Mar 20 10:17:52 2026
InstallationDate: Installed on 2025-11-06 (134 days ago)
InstallationMedia: Ubuntu 24.04.3 LTS "Noble Numbat" - Release amd64 
(20250805.1)
PackageArchitecture: all
SourcePackage: dynamic-motd
UpgradeStatus: No upgrade log present (probably fresh install)

** Affects: dynamic-motd (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug noble wayland-session

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2145036

Title:
  20-system-info fails with ZeroDivisionError

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/dynamic-motd/+bug/2145036/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to