switch to wget results in no motd-news in clouds
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
base-files (Ubuntu) |
Fix Released
|
Undecided
|
Andreas Hasenack |
Bug Description
cloud-specific motd news relies on the user-agent string cloud_id/
curl happily returns that without flagging this as an error situation (a 404: it needs an extra command-line argument for that). wget, however, fails without printing the error document:
$ wget -U cloud_id/aws https:/
--2020-07-27 15:45:47-- https:/
Resolving motd.ubuntu.com (motd.ubuntu.
Connecting to motd.ubuntu.com (motd.ubuntu.
HTTP request sent, awaiting response... 404 Not Found
2020-07-27 15:45:48 ERROR 404: Not Found.
Not only that, it will also fail in its exit status:
$ echo $?
8
Whereas curl didn't:
$ curl -A cloud_id/aws https:/
* "If you've been waiting for the perfect Kubernetes dev solution for
macOS, the wait is over. Learn how to install Microk8s on macOS."
https:/
$ echo $?
0
$
We need to pass --content-on-error, ignore the error status 8 (or all?) and make it quiet (-q):
$ wget -U cloud_id/aws https:/
* "If you've been waiting for the perfect Kubernetes dev solution for
macOS, the wait is over. Learn how to install Microk8s on macOS."
https:/
8
Related branches
- Christian Ehrhardt (community): Approve
- Canonical Server: Pending requested
- Canonical Server Core Reviewers: Pending requested
-
Diff: 59 lines (+23/-3)2 files modifieddebian/changelog (+9/-0)
motd/50-motd-news (+14/-3)
Changed in base-files (Ubuntu): | |
assignee: | nobody → Andreas Hasenack (ahasenack) |
status: | New → In Progress |
This bug was fixed in the package base-files - 11ubuntu10
---------------
base-files (11ubuntu10) groovy; urgency=medium
* motd/50-motd-news: use the actual wget version variable in the
user-agent string
* motd/50-motd-news: handle wget's behavior with a 404 document
(LP: #1889117)
-- Andreas Hasenack <email address hidden> Mon, 27 Jul 2020 16:44:07 -0300