Slow operations are recommended in motd to use caching and here I think this should be done as well.
Just like other operations using slow calls or network they should cache it and only run every few seconds. That will already cut down any mistaken "run on non-interactive" by an order of magnitude and generally it doesn't matter too much for this output if it is current or 5 seconds old as long as it isn't from yesteryear. So even if all else fails this should - as a fallback - help a bit right? -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1893716 Title: scripts in /etc/update-motd.d/ run even on login via non-interactive scp and sftp sessions To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/update-motd/+bug/1893716/+subscriptions -- ubuntu-bugs mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
