Bug#422088: [Patch] wish preseed_fetch could distinguish between non-existance of a requested file and other failures to fetch file.
This mail is mostly a note to myself in a safe place!
On 08/05/2007, Alex Owen <firstname.lastname@example.org> wrote:
> On 06/05/07, Joey Hess <email@example.com> wrote:
> > Alex Owen wrote:
> > > + elif grep "server returned error 404" $log >/dev/null ; then
> > It's generally not a good idea to rely on command error messages like
> > this.
> I agree,
> I was thinking that getting wget to give a sensible exit status rather
> than parsing the error message. Perhaps that warrents a wishlist bug
> on wget?
I have posted to GNU-wget mailing list:
proposing wget exits with exit status 4 for 404 errors
Attached is an untested patch to busybox wget to implement an exit
status of 4 for 404 errors.
That is all for this update!
--- networking/wget.c 2006-04-16 17:27:46.000000000 +0100
+++ networking/wget.c.rao 2007-09-13 21:36:44.000000000 +0100
@@ -372,6 +372,11 @@
+ case 404:
+ bb_default_error_retval = 4;
+ close_delete_and_die("server returned error %d: %s", atoi(s), buf);
+ /*Never gets here*/