I get the same here in hardy. The relevant peace of buggy code has not
changed in jaunty. Problem is that gconftool complains to stderr when a
value is not set (in hardy and jaunty):
$ gconftool --get /system/http_proxy/port
No value set for `/system/http_proxy/port'
redirecting to stderr solves the problem:
gconftool --get /system/http_proxy/port 2>/dev/null
a quick fix would be to use in /etc/cron.daily/apt
...
# set the proxy based on the admin users gconf settings
admin_user=$(getent group admin|cut -d: -f4|cut -d, -f1)
if [ -n "$admin_user" ] && [ -x /usr/bin/sudo ] && [ -z "$http_proxy" ] && [ -x
/usr/bin/gconftool ]; then
use=$(sudo -u "$admin_user" gconftool --get
/system/http_proxy/use_http_proxy 2> /dev/null)
host=$(sudo -u "$admin_user" gconftool --get /system/http_proxy/host 2>
/dev/null)
port=$(sudo -u "$admin_user" gconftool --get /system/http_proxy/port 2>
/dev/null)
if [ "$use" = "true" ] && [ -n "$host" ] && [ -n "$port" ]; then
export http_proxy="http://$host:$port/"
fi
fi
...
Better IMHO would be to move the check, with added stderr redirection, out of
the if
and test for it too
use=$(sudo -u "$admin_user" gconftool --get
/system/http_proxy/use_http_proxy 2> /dev/null)
[used side effect: if admin_user is not defined 2>/dev/null eats sudos
complain too
and use != "true" with is what's wanted.]
So when use_http_proxy is not defined or not 'true' port and host are
not tested at all. If use_http_proxy is set and port or host are not,
then it's okay to generate an error + e-mail because that is a 'makes no
sense' situation. Patch for this is attached.
Achim
** Attachment added: "cron-daily-apt.diff"
http://launchpadlibrarian.net/21800493/cron-daily-apt.diff
** Changed in: apt (Ubuntu)
Status: New => Confirmed
--
/etc/cron.daily/apt produces daily email on server machine
https://bugs.launchpad.net/bugs/256102
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs