[Bug 1932075] [NEW] 50-motd-news only displays last URL

John Bartoszewski 1932075 at bugs.launchpad.net
Tue Jun 15 20:41:44 UTC 2021


Public bug reported:

50-motd-news loops through a list of URLs attempting to save each to a CACHE file.
But the script overwrites CACHE so only the last URL received is saved.

The loop:
for u in $URLS; do ...

Where it overwrites CACHE instead of appending to it:

safe_print "$NEWS" 2>/dev/null >$CACHE || true

and

: > "$CACHE"

** Affects: base-files (Ubuntu)
     Importance: Undecided
         Status: New

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

Title:
  50-motd-news only displays last URL

Status in base-files package in Ubuntu:
  New

Bug description:
  50-motd-news loops through a list of URLs attempting to save each to a CACHE file.
  But the script overwrites CACHE so only the last URL received is saved.

  The loop:
  for u in $URLS; do ...

  Where it overwrites CACHE instead of appending to it:

  safe_print "$NEWS" 2>/dev/null >$CACHE || true

  and

  : > "$CACHE"

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/base-files/+bug/1932075/+subscriptions



More information about the foundations-bugs mailing list