motd-news only works with one URL even though docs say mutiple URLs can be configured
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
base-files (Ubuntu) |
Triaged
|
Low
|
Unassigned |
Bug Description
The motd-news script etc/update-
the following section
```
# Loop over any configured URLs
for u in $URLS; do
# Ensure https:// protocol, for security reasons
case $u in
https:/
;;
https:/
;;
*)
;;
esac
# If we're forced, set the wait to much higher (1 minute)
[ "$FORCED" = "1" ] && WAIT=60
# Fetch and print the news motd
if curl --connect-timeout "$WAIT" --max-time "$WAIT" -A "$USER_AGENT" -o- "$u" >"$NEWS" 2>"$ERR"; then
# At most, 10 lines of text, remove control characters, print at most 80 characters per line
# Try to update the cache
else
: > "$CACHE"
fi
done
```
As you can see the $CACHE gets overwritten if multiple URLs are configured in /etc/default/
/etc/default/
```
# Configure the source of dynamic MOTD news
# White space separated list of 0 to many news services
# For security reasons, these must be https
# and have a valid certificate
# Canonical runs a service at motd.ubuntu.com, and you
# can easily run one too
URLS="https:/
```
description: | updated |
Changed in base-files (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Low |