[Bug 1342424] Re: update-notifier presents unclear update message
Michael Vogt
michael.vogt at canonical.com
Wed Jul 16 08:15:49 UTC 2014
@Nick: Yeah! Its kind of ironic that I was using iso dates before and
during the internal testing it was suggested to use the dates based on
the locale. Oh well.
It turns out that pam-motd runs the update-motd stuff without LANG/LOCALE information.
"""
+ if (!system("/usr/bin/env -i PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin run-parts --lsbsysinit /etc/update-motd.d > /run/motd.dynamic.new"))
"""
So to fix that, something like:
"""
char cmd[255];
char *language = pam_getenv(pamh, "LANGUAGE");
if(language == NULL) language = "";
char *lang = pam_getenv(pamh, "LANG");
if(locale == NULL) locale = "";
snprintf(cmd, sizeof(cmd), "/usr/bin/env -i LANGUAGE=\"%s\" LANG=\"%s\" PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin run-parts --lsbsysinit /etc/update-motd.d > /run/motd.dynamic.new", language, lang);
if(!system(cmd))
"""
I would love to get feedback from the pam maintainer if that is something we want to support, I'm happy to write the code for this. But given the side-effects that all update-motd scripts are suddenly running localized I think simply going to iso date format in the script is the better option for now.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to update-notifier in Ubuntu.
https://bugs.launchpad.net/bugs/1342424
Title:
update-notifier presents unclear update message
Status in “update-notifier” package in Ubuntu:
In Progress
Bug description:
I logged in to a server and got:
Your current Hardware Enablement Stack (HWE) is going out of support
on 08/07/14. After this date security updates for critical parts (kernel
and graphics stack) of your system will no longer be available.
For more information, please see:
http://wiki.ubuntu.com/1204_HWE_EOL
To upgrade to a supported (or longer supported) configuration:
* Upgrade from Ubuntu 12.04 LTS to Ubuntu 14.04 LTS by running:
sudo do-release-upgrade
OR
* Install a newer HWE version by running:
sudo apt-get install linux-generic-lts-trusty linux-image-generic-lts-trusty
and reboot your system.
That's all well and good, but 08/07/14 is not a meaningful date. Here, it's in the near past. Some places, it's in the near future. When is the HWE going out of support? Who can tell?
(NB: pretty sure I have the wrong package, but I have no idea what the
real one is.)
ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: update-notifier (not installed)
ProcVersionSignature: Ubuntu 3.8.0-42.63~precise1-generic 3.8.13.23
Uname: Linux 3.8.0-42-generic x86_64
ApportVersion: 2.0.1-0ubuntu17.6
Architecture: amd64
Date: Wed Jul 16 11:38:29 2014
MarkForUpload: True
SourcePackage: update-notifier
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/update-notifier/+bug/1342424/+subscriptions
More information about the foundations-bugs
mailing list